diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-21 10:44:16 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-21 10:44:16 +0200 |
commit | 17fd3f752d5e37df906abddf1f13fd7ad1de6c00 (patch) | |
tree | aa2db0ed93d6103bd2f59d7a8c183c32e4a55a85 /market.py | |
parent | c5ca26b83ca9f120fb39f1e61265216342f8a4db (diff) | |
download | Trader-17fd3f752d5e37df906abddf1f13fd7ad1de6c00.tar.gz Trader-17fd3f752d5e37df906abddf1f13fd7ad1de6c00.tar.zst Trader-17fd3f752d5e37df906abddf1f13fd7ad1de6c00.zip |
Add latest date to redis
Diffstat (limited to 'market.py')
-rw-r--r-- | market.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -85,6 +85,8 @@ class Market: | |||
85 | conn.set(key, log, ex=31*24*60*60) | 85 | conn.set(key, log, ex=31*24*60*60) |
86 | key = "/cryptoportfolio/{}/latest/{}".format(self.market_id, type_) | 86 | key = "/cryptoportfolio/{}/latest/{}".format(self.market_id, type_) |
87 | conn.set(key, log) | 87 | conn.set(key, log) |
88 | key = "/cryptoportfolio/{}/latest/date".format(self.market_id) | ||
89 | conn.set(key, date.isoformat()) | ||
88 | except Exception as e: | 90 | except Exception as e: |
89 | print("impossible to store report to redis: {}; {}".format(e.__class__.__name__, e)) | 91 | print("impossible to store report to redis: {}; {}".format(e.__class__.__name__, e)) |
90 | 92 | ||