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

Bot crashes when the steam API is busy #4

Open
masonelmore opened this issue Jul 3, 2018 · 0 comments
Open

Bot crashes when the steam API is busy #4

masonelmore opened this issue Jul 3, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@masonelmore
Copy link
Owner

03-07-18 13:09:28 bot      DEBUG    Leaving Planet 529 before joining Planet 532
03-07-18 13:09:28 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /IMiniGameService/LeaveGame/v0001/ HTTP/1.1" 200 15
03-07-18 13:09:28 bot      DEBUG    Calling leave_game() gave eresult: 10 - unknown error
03-07-18 13:09:28 bot      DEBUG    Retrying API call in 1 seconds...
03-07-18 13:09:29 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /IMiniGameService/LeaveGame/v0001/ HTTP/1.1" 200 15
03-07-18 13:09:29 bot      DEBUG    Calling leave_game() gave eresult: 10 - unknown error
03-07-18 13:09:29 bot      DEBUG    Retrying API call in 2 seconds...
03-07-18 13:09:31 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /IMiniGameService/LeaveGame/v0001/ HTTP/1.1" 200 15
03-07-18 13:09:31 bot      DEBUG    Calling leave_game() gave eresult: 10 - unknown error
03-07-18 13:09:31 bot      DEBUG    Retrying API call in 4 seconds...
03-07-18 13:09:35 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /IMiniGameService/LeaveGame/v0001/ HTTP/1.1" 200 15
03-07-18 13:09:35 bot      DEBUG    Calling leave_game() gave eresult: 10 - unknown error
03-07-18 13:09:35 bot      DEBUG    Retrying API call in 8 seconds...
03-07-18 13:09:44 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /IMiniGameService/LeaveGame/v0001/ HTTP/1.1" 200 15
03-07-18 13:09:44 bot      DEBUG    Calling leave_game() gave eresult: 10 - unknown error
03-07-18 13:09:44 bot      DEBUG    Retrying API call in 16 seconds...
03-07-18 13:10:00 root     ERROR    ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * !
03-07-18 13:10:00 root     ERROR    ! Something went horribly wrong.  Restarting bot... !
03-07-18 13:10:00 root     ERROR    ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * !
03-07-18 13:10:00 root     DEBUG    Unhandled exception:
Traceback (most recent call last):
  File "main.py", line 48, in <module>
    bot.run()
  File "D:\Programming\Python\salienbot\bot.py", line 49, in run
    self._call_api(self.api.leave_game, self.player.active_planet)
  File "D:\Programming\Python\salienbot\bot.py", line 91, in _call_api
    raise Exception('Unable to recover from failed API call attempts')

We don't have to bail out on eresult: 10. We just need to keep backing off (up to a point) and keep retrying.

@masonelmore masonelmore added the bug Something isn't working label Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant