Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature (Auto Restart): index.ts & Logger.ts #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xunilalala
Copy link

Added the logic for auto-restart: If the child process does not output logs for an extended period (as defined in config.json as restartTime), it will exit abnormally. If the child process exits abnormally, the main process will attempt to fork a new child process with the same account data for a maximum of five attempts.

#96 Adding auto-restart

Added the logic for auto-restart: If the child process does not output logs for an extended period (as defined in config.json as restartTime), it will exit abnormally. If the child process exits abnormally, the main process will attempt to fork a new child process with the same account data for a maximum of five attempts.
@xunilalala
Copy link
Author

When the cluster is set to 1, the runMaster function will still be initiated, creating a main process to supervise the child processes. However, when the cluster is greater than 1, the process overhead remains the same as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant