This repository is for editing the schema.go file and changing the value of DefaultMaxHTTPAttempts to 2. Although it had been tried 5 times to avoid losing data from the API, it was reduced to 2 times. See below for details.
Plugin_HTTPAttempts.sh has the following features.
- Check the current version of
Node.js. If it is different from the default ofPluginNode, which isv15.14.0, change the version tov15.14.0using nvm. - Edit the
schema.gofile in the script. The item to be edited is to change the value ofDefaultMaxHTTPAttemptsfrom5to2. - Stop the main process using
pm2and load theprofile. - Install the
Pluginusingmake install.
Before using this script, you need to meet the following requirements.
- You can switch the version of
Node.jsusingnvm. PM2is installed and the necessary scripts for managing PluginNode can be executed.- Make sure that the path to the
schema.gofile used in the script is correct. By default, the path is~/plugin-deployment/Plugin/core/store/orm/schema.go.
- It is recommended to create a backup before using this script.
- The name of the main process must be
2_nodeStartPM2or[sS]tart[nN]ode. If these process names are not found, the script will exit with an error. - If you run the script with only
./Plugin_HTTPAttempts.sh, the version of Node.js will only be valid within the shell script process and changes will be discarded when the shell script is exited. By runningsource ./Plugin_HTTPAttempts.sh, the version of Node.js will be the default of PluginNode, which isv15.14.0.
You can run this script using the following command:
-
Open the terminal and move to any directory where you can run the
git cloneandsourcecommands. -
Clone the repository using the following command:
git clone https://github.com/11ppm/Plugin_HTTPAttempts- Move to the
Plugin_HTTPAttemptsdirectory:
cd Plugin_HTTPAttempts- Give execution permission to the
Plugin_HTTPAttempts.shfile: sh
chmod +x Plugin_HTTPAttempts.sh- Run the shell script using the
sourcecommand. Be sure to include./.
source ./Plugin_HTTPAttempts.sh- If you run the script with only
./Plugin_HTTPAttempts.sh, the version of Node.js will only be valid within the shell script process and changes will be discarded when the shell script is exited. By runningsource ./Plugin_HTTPAttempts.sh, the version of Node.js will be the default of PluginNode, which isv15.14.0. - If you are already running a version other than v15.14.0 and you want to maintain that version, you can either run ./Plugin_HTTPAttempts.sh without using the source command, or run nvm use after the shell script has exited.
./Plugin_HTTPAttempts.sh- @11ppm
