Microsoft-Rewards-Script icon indicating copy to clipboard operation
Microsoft-Rewards-Script copied to clipboard

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

Open maolei1024 opened this issue 1 year ago • 3 comments

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

maolei1024 avatar Jun 12 '24 01:06 maolei1024

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.

maolei1024 avatar Jun 12 '24 01:06 maolei1024

Might be me who isn't using it correcty, but i can't manage to make it work constantly. It often start a new page with about:blank instand of rewards.bing.com, and it almost always doesn't find the password field. Tried to come back to the vanilla script, worked perfectly.

serzak51 avatar Jun 24 '24 11:06 serzak51

@serzak51 Bro, this is a Pull Request. You replied in the wrong place. Please delete your reply after seeing this, and I will delete my reply to you.

I have opened the issue tracker for the repository where this code was submitted. If you have any questions about the automatic restart, please submit an issue there. If you have questions regarding the main repository, please submit an issue to the main repository. In this PR, you can see my changes. I only added the restart logic and did not modify the login part at all.

Let me clarify the logic for you because the information you provided is insufficient for analysis: Rolling back to the main repository code works fine, but this doesn't---> xunilalal keeps restarting?---> Why does it keep restarting?---> The watchdog process restarts the code because it isn't working---> Why isn't the code working?--> Can't find the password field---> Login module issue---> xunilalal's submission didn't touch the login module---> The main repository code itself has this issue------> How to reproduce?----> serzak51 Please try cloning a new copy of the main repository to a new location on your computer and start it to see if there are any issues. If there are, please submit an issue to the main repository. If there are not, please clone a new copy of xunilalal's repository to a new location on your computer, start the code, and observe if there are any issues. If there are, please submit an issue to xunilalal's repository. I will look into it.

maolei1024 avatar Jun 25 '24 04:06 maolei1024

Due to changes regarding to upcoming 1.4.12, this won't be merged.

TheNetsky avatar Oct 15 '24 11:10 TheNetsky