<reponame>anothercookiecrumbles/Realtime-Storytelling-lectures<gh_stars>1-10
import json
import sys
import redis

conn = redis.Redis()

while 1:
    line = sys.stdin.readline()
    d = json.loads(line)
    delta = d["delta"]
    time = d["t"]
    conn.setex(time, delta, 120)
    print json.dumps({"time":time, "delta":delta})
