Commit 595909f2 authored by Landon DeCoito's avatar Landon DeCoito

added app.route for dev use ONLY and redid some commented code

parent f9e4c279
...@@ -9,11 +9,12 @@ from redisactions import redisdb ...@@ -9,11 +9,12 @@ from redisactions import redisdb
# python imports # python imports
import json import json
# import time
# other imports # other imports
import redis import redis
import schedule import schedule
import time
# setting up flask instance # setting up flask instance
app = Flask(__name__) app = Flask(__name__)
...@@ -42,8 +43,20 @@ def display_GC_data(): ...@@ -42,8 +43,20 @@ def display_GC_data():
resp.headers['Content-Type'] = 'application/json; charset=utf-8' resp.headers['Content-Type'] = 'application/json; charset=utf-8'
return resp return resp
@app.route("/updatedbs")
def updateroute():
return Response(updatebothdbs().replace("\n","</br>"))
def shutdown():
runScheduler = False
request.environ.get('werkzeug.server.shutdown')
# this needs to be uncommented in order for the scheduler to work # this needs to be uncommented in order for the scheduler to work
# but it's being weird cause it's hogging the thread # but it's being weird cause it's hogging the thread
# while True: # runScheduler = True
# while runScheduler:
# schedule.run_pending() # schedule.run_pending()
# time.sleep(5) # time.sleep(5)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment