Add more timeouts
This commit is contained in:
parent
d2de4e13d7
commit
96bf3d887b
@ -52,7 +52,7 @@ class Main:
|
||||
|
||||
def sync_cards(self):
|
||||
logging.info("Downloading users list")
|
||||
r = self.session.get(self.api_allowed)
|
||||
r = self.session.get(self.api_allowed, timeout=15)
|
||||
try:
|
||||
allowed_uids = r.json()["allowed_uids"]
|
||||
except JSONDecodeError as e:
|
||||
@ -81,7 +81,7 @@ class Main:
|
||||
"timestamp": time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
}
|
||||
print(data)
|
||||
requests.post(self.api_swipe, data=data)
|
||||
requests.post(self.api_swipe, data=data, timeout=15)
|
||||
|
||||
def listen_notification(self):
|
||||
while 1:
|
||||
|
Loading…
Reference in New Issue
Block a user