Skip to content

Commit

Permalink
Use correct "backoff" in !!/allspam #3793 -autopull
Browse files Browse the repository at this point in the history
  • Loading branch information
makyen committed Apr 3, 2020
1 parent 80b54d7 commit 69481be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chatcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1709,9 +1709,9 @@ def allspam(msg, url):
'site': u_site
}
answer_res = requests.get(req_url, params=params).json()
if "backoff" in res:
if GlobalVars.api_backoff_time < time.time() + res["backoff"]:
GlobalVars.api_backoff_time = time.time() + res["backoff"]
if "backoff" in answer_res:
if GlobalVars.api_backoff_time < time.time() + answer_res["backoff"]:
GlobalVars.api_backoff_time = time.time() + answer_res["backoff"]
GlobalVars.api_request_lock.release()
# Finally, set the attribute
post_data.question_id = answer_res['items'][0]['question_id']
Expand Down

0 comments on commit 69481be

Please sign in to comment.