Cluster updates + add new start/stop options

-More graceful shutdown of node cluster on 'npm stop' with better cleanup of resources on exit
-Added new stop_explorer.sh script which looks up the explorer port # via settings file and closes the application running on that port # instead of saving and killing the process by pid as it did before
-Added support for pm2 and forever using 'npm run start-pm2' and 'npm run start-forever' respectively
-pm2 is automatically installed when starting with 'npm run start-pm2' if it is not already installed
-forever is automatically installed when starting with 'npm run start-forever' if it is not already installed
-Updated existing npm commands in package.json by replacing hardcoded 'node' with '$(which node)'
-/path/to/nodejs changed to /path/to/node in the /settings.json.template, /lib/settings.js and /scripts/sync.js files
-README updates:
 -Added a new 'Start/Stop the Explorer' section
 -Added PM2 instructions to the 'Start/Stop the Explorer' section
 -Moved Start/Stop Explorer instructions to the 'Start/Stop the Explorer' section
 -Moved Forever instructions to the 'Start/Stop the Explorer' section
 -/path/to/nodejs changed to /path/to/node
 -Some additional small misc fixes
This commit is contained in:
joeuhren
2021-04-17 13:26:05 -06:00
parent 24cd111e0c
commit f948e29085
9 changed files with 236 additions and 88 deletions
+2 -2
View File
@@ -1045,9 +1045,9 @@
// If you sync using more than 1 parallel task, then historical balance data for wallet addresses can possibly be saved out-of-order and there is currently no workaround for this.
// Therefore, it is recommended to keep this setting to 1 parallel task for now until a proper solution can be procured for the historical balance issue.
"block_parallel_tasks": 1,
// update_timeout: The amount of time to wait (in milliseconds) before moving to the next block or transaction during blockchain sync or reindex (scripts/sync.sh /path/to/nodejs update or scripts/sync.sh /path/to/nodejs reindex)
// update_timeout: The amount of time to wait (in milliseconds) before moving to the next block or transaction during blockchain sync or reindex (scripts/sync.sh /path/to/node update or scripts/sync.sh /path/to/node reindex)
"update_timeout": 10,
// check_timeout: The amount of time to wait (in milliseconds) before moving to the next block or transaction during a check sync (scripts/sync.sh /path/to/nodejs check)
// check_timeout: The amount of time to wait (in milliseconds) before moving to the next block or transaction during a check sync (scripts/sync.sh /path/to/node check)
"check_timeout": 250,
// save_stats_after_sync_blocks: During index syncronization, stats are saved after processing this many blocks to save time by not having to save after each block
"save_stats_after_sync_blocks": 100,