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
aa69f03b
Commit
aa69f03b
authored
Jul 12, 2018
by
Landon DeCoito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reordered redisactions imports and fixed whitespace
parent
d836bd59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
mason-today/redisactions.py
mason-today/redisactions.py
+8
-3
No files found.
mason-today/redisactions.py
View file @
aa69f03b
# app imports
from
__init__
import
redisdb
# python imports
import
datetime
#
third party
imports
#
other
imports
import
redis
from
__init__
import
redisdb
# I'm thinking we store a couple things
# first: a key-value where the value is the dictlist
...
...
@@ -16,6 +18,7 @@ from __init__ import redisdb
# function. and every time we find an error we want to run a dberrorfill()
# function.
# this will update the live dictlist and the cachedate
# returns true if the dictlist is not empty, false otherwise
def
gcdbfill
(
dictlist
):
...
...
@@ -27,6 +30,7 @@ def gcdbfill(dictlist):
return
redisdb
.
get
(
"gcdict"
)
is
not
None
# saves new dictlist in place of previous 25Live dictlist
# returns true if the dictlist is not empty, false otherwise
def
livedbfill
(
dictlist
):
...
...
@@ -35,9 +39,10 @@ def livedbfill(dictlist):
setlastcachedate
(
"livecachedate"
,
str
(
datetime
.
datetime
.
now
()))
except
e
:
return
False
return
redisdb
.
get
(
"livedict"
)
is
not
None
# saves the last time the cache was updated
# return true if the cachedate is not empty, false otherwise
def
setlastcachedate
(
cache
,
date
):
...
...
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