fix scoreboard caching
parent
49435b11cf
commit
d6cbf6ad3c
|
@ -1,15 +1,16 @@
|
|||
import redis
|
||||
import data.scoreboard
|
||||
from data import scoreboard
|
||||
import json
|
||||
import config
|
||||
|
||||
r = redis.StrictRedis()
|
||||
r = redis.StrictRedis(host=config.redis.host, port=config.redis.port, db=config.redis.db)
|
||||
|
||||
def set_complex(key, val):
|
||||
r.set(key, json.dumps(val))
|
||||
|
||||
|
||||
def run():
|
||||
data = data.scoreboard.calculate_scores()
|
||||
graphdata = utils.scoreboard.calculate_graph(data)
|
||||
data = scoreboard.calculate_scores()
|
||||
graphdata = scoreboard.calculate_graph(data)
|
||||
set_complex("scoreboard", data)
|
||||
set_complex("graph", graphdata)
|
||||
|
|
Loading…
Reference in New Issue