Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
mason-today-web
Commits
595909f2
Commit
595909f2
authored
Jul 16, 2018
by
Landon DeCoito
Browse files
added app.route for dev use ONLY and redid some commented code
parent
f9e4c279
Changes
1
Hide whitespace changes
Inline
Side-by-side
mason-today/__init__.py
View file @
595909f2
...
...
@@ -9,11 +9,12 @@ from redisactions import redisdb
# python imports
import
json
# import time
# other imports
import
redis
import
schedule
import
time
# setting up flask instance
app
=
Flask
(
__name__
)
...
...
@@ -42,8 +43,20 @@ def display_GC_data():
resp
.
headers
[
'Content-Type'
]
=
'application/json; charset=utf-8'
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
# but it's being weird cause it's hogging the thread
# while True:
# runScheduler = True
# while runScheduler:
# schedule.run_pending()
# time.sleep(5)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment