set time out

This commit is contained in:
Sayyid Hamid Mahdavi 2020-11-22 16:08:48 +03:30
parent d82ab37b0b
commit 8cac19570f

View file

@ -20,5 +20,9 @@ def send_notification(phone_number=None,
'phone_number': phone_number,
"body": f'{title}:\n{body}'
}
try:
print(client.request(required_scopes=SCOPES, url=f'{settings.BASE_NOTIFICATION_URL}/notifications/', data=data,
method='post').text)
method='post', timeout=5).text)
except Exception as e:
print(e)