Private
Public Access
1
0

fixing tp?

This commit is contained in:
Sander Roosendaal
2020-06-07 13:36:57 +02:00
parent e55b4fc3ca
commit 2ec6e2b4ff
2 changed files with 1 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ def imports_open(user,oauth_data):
tokenname = oauth_data['tokenname']
refreshtokenname = oauth_data['refreshtokenname']
expirydatename = oauth_data['expirydatename']
if tokenexpirydate and timezone.now()+timedelta(seconds=3599)>tokenexpirydate:
if tokenexpirydate and timezone.now()+timedelta(seconds=60)>tokenexpirydate:
token = imports_token_refresh(
user,
tokenname,

View File

@@ -72,15 +72,6 @@ def get_token(code):
data=post_data,verify=False,
)
print(response.text)
with open("media/tperrors.log","a") as errorlog:
timestr = strftime("%Y%m%d-%H%M%S")
errorlog.write(timestr+"\r\n")
json.dump(response.json(),errorlog)
errorlog.write("\r\n"+str(response.status_code)+' '+response.text)
errorlog.write("\r\n")
try:
token_json = response.json()