API
Some checks failed
Ik ben Henk python api ftp deploy / Deploy Python api (push) Has been cancelled
Some checks failed
Ik ben Henk python api ftp deploy / Deploy Python api (push) Has been cancelled
This commit is contained in:
6
app.py
6
app.py
@@ -28,7 +28,7 @@ def getAllAuctions(countrycode):
|
||||
|
||||
except Exception as e:
|
||||
log('something went wrong ')
|
||||
print_exc(e)
|
||||
print_exc()
|
||||
return 'internal server error', 500
|
||||
|
||||
@app.route("/v2/refreshauction/<countrycode>")
|
||||
@@ -43,8 +43,8 @@ def refreshAllAuctions(countrycode):
|
||||
|
||||
except Exception as e:
|
||||
log('something went wrong with refreshing the auctions')
|
||||
print_exc(e)
|
||||
return 'internal server error' + e, 500
|
||||
print_exc()
|
||||
return 'internal server error', 500
|
||||
|
||||
|
||||
|
||||
|
||||
5
cache.py
5
cache.py
@@ -1,4 +1,5 @@
|
||||
from datetime import datetime, timedelta
|
||||
import os
|
||||
import os.path
|
||||
from pathlib import Path
|
||||
import time
|
||||
@@ -69,5 +70,9 @@ class FileCache():
|
||||
log('adding filecacheobject ' + key)
|
||||
json_data = JsonEncoder().encode(obj)
|
||||
# json_data = json.dumps(obj, cls=JsonEncoder, indent=2)
|
||||
|
||||
# Ensure the filecache directory exists
|
||||
os.makedirs("./filecache", exist_ok=True)
|
||||
|
||||
with open("./filecache/" + key + ".json", 'w+') as f:
|
||||
f.write(json_data)
|
||||
|
||||
Reference in New Issue
Block a user