conn.set(key, log, ex=31*24*60*60)
key = "/cryptoportfolio/{}/latest/{}".format(self.market_id, type_)
conn.set(key, log)
+ key = "/cryptoportfolio/{}/latest/date".format(self.market_id)
+ conn.set(key, date.isoformat())
except Exception as e:
print("impossible to store report to redis: {}; {}".format(e.__class__.__name__, e))
mock.call.set("/cryptoportfolio/1/latest/type1", "payload1"),
mock.call.set("/cryptoportfolio/1/2018-03-24T00:00:00/type2", "payload2", ex=31*24*60*60),
mock.call.set("/cryptoportfolio/1/latest/type2", "payload2"),
+ mock.call.set("/cryptoportfolio/1/latest/date", "2018-03-24T00:00:00"),
])
connect_mock.reset_mock()