-
Notifications
You must be signed in to change notification settings - Fork 2k
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
farmer: Introduce UPDATE_POOL_INFO_FAILURE_RETRY_INTERVAL
#11076
farmer: Introduce UPDATE_POOL_INFO_FAILURE_RETRY_INTERVAL
#11076
Conversation
Retry to load the pool info with a 2 minutes interval if it failed.
1b13582
to
2236cf7
Compare
UPDATE_POOL_INFO_INTERVAL
from 3600
to 300
UPDATE_POOL_INFO_FAILURE_RETRY_INTERVAL
@@ -479,6 +480,8 @@ async def update_pool_state(self): | |||
# Only update the first time from GET /pool_info, gets updated from GET /farmer later | |||
if pool_state["current_difficulty"] is None: | |||
pool_state["current_difficulty"] = pool_info["minimum_difficulty"] | |||
else: | |||
pool_state["next_pool_info_update"] = time.time() + UPDATE_POOL_INFO_FAILURE_RETRY_INTERVAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you able to try this for the pool_info is None
case and the "error_code" not in pool_info
case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, we need pool tests :/ But it's pretty obvious actually and only affects the failure case.
This might result in quite a log of retries if the failure isn't transient - maybe the pool has a problem, and the client will retry every 2 mins. |
Hm, i don't feel like a log every 2 minutes is too bad if something is wrong. |
Retry to load the pool info with a 2 minutes interval if it failed.
Retry to load the pool info with a 2 minutes interval if it failed.