soonduq Posted June 27, 2017 Report Posted June 27, 2017 (edited) I'm using pm2. When steam go down pm2 automaticly restarting bot, and then i've got error: RareLimit ExceededHow to fix this? Edited June 28, 2017 by soonduq Quote
vmysiur Posted June 29, 2017 Report Posted June 29, 2017 https://steamerrors.com/84 - slow down. I do not see the point of doing a restart pm2 if Steam lies. Quote
soonduq Posted June 29, 2017 Author Report Posted June 29, 2017 https://steamerrors.com/84 - slow down.I do not see the point of doing a restart pm2 if Steam lies.pm2 automaticly restarting when bot.js crashed Quote
vmysiur Posted June 29, 2017 Report Posted June 29, 2017 pm2 automaticly restarting when bot.js crasheduse try ... catch.. or handle exceptions) Quote
soonduq Posted June 29, 2017 Author Report Posted June 29, 2017 use try ... catch.. or handle exceptions)can you give example please?) Quote
vmysiur Posted June 30, 2017 Report Posted June 30, 2017 (edited) can you give example please?)For example when sending an offer.There are many options: try { offer.send() } catch(err) { //if fire exception you will come here ...handle this 1.log 2.retry logic 3.etc. } offer.send(err => err ? ...further logic : ...handle an error) in nodejs.... process.on("uncaughtException", err => ...handle an error);. It's not all the options, but I think that's enough. For other methods, respectively, too. The application should not crash. Good Luck. Edited June 30, 2017 by vmysiur Quote
soonduq Posted July 2, 2017 Author Report Posted July 2, 2017 Sry, but how use this for autorization? Quote
vmysiur Posted July 5, 2017 Report Posted July 5, 2017 In any way that I described above. For example: function foo(account) { try { ...Here you call the method that authorizes the account } catch (err) { ...Here you are processing an error, as an example you can repeat the authorization logic through time using the timeout. Repeatedly call this function after some time... return setTimeout(() => foo(account), some time); } } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.