Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mason-today-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
mason-today-web
Commits
595909f2
Commit
595909f2
authored
Jul 16, 2018
by
Landon DeCoito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added app.route for dev use ONLY and redid some commented code
parent
f9e4c279
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
mason-today/__init__.py
mason-today/__init__.py
+15
-2
No files found.
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