Retry on 409 error
This commit is contained in:
parent
5eb0edaaf9
commit
1702926605
|
@ -4,6 +4,7 @@ import hmac
|
|||
import json
|
||||
import os
|
||||
import pprint
|
||||
import random
|
||||
import socket
|
||||
import time
|
||||
|
||||
|
@ -47,6 +48,8 @@ def report_loadavg():
|
|||
pprint.pp(report)
|
||||
r = requests.post(baseurl + "report", json=report)
|
||||
print(r)
|
||||
if r.status_code != 409:
|
||||
return
|
||||
time.sleep(0.5 + random.random())
|
||||
|
||||
report_loadavg()
|
||||
|
|
Loading…
Reference in New Issue