diff options
Diffstat (limited to 'market.py')
-rw-r--r-- | market.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5,6 +5,7 @@ import psycopg2 | |||
5 | from store import * | 5 | from store import * |
6 | from cachetools.func import ttl_cache | 6 | from cachetools.func import ttl_cache |
7 | from datetime import datetime | 7 | from datetime import datetime |
8 | import datetime | ||
8 | from retry import retry | 9 | from retry import retry |
9 | import portfolio | 10 | import portfolio |
10 | 11 | ||
@@ -28,7 +29,7 @@ class Market: | |||
28 | for key in ["user_id", "market_id", "pg_config"]: | 29 | for key in ["user_id", "market_id", "pg_config"]: |
29 | setattr(self, key, kwargs.get(key, None)) | 30 | setattr(self, key, kwargs.get(key, None)) |
30 | 31 | ||
31 | self.report.log_market(self.args, self.user_id, self.market_id) | 32 | self.report.log_market(self.args) |
32 | 33 | ||
33 | @classmethod | 34 | @classmethod |
34 | def from_config(cls, config, args, **kwargs): | 35 | def from_config(cls, config, args, **kwargs): |
@@ -40,7 +41,7 @@ class Market: | |||
40 | 41 | ||
41 | def store_report(self): | 42 | def store_report(self): |
42 | self.report.merge(Portfolio.report) | 43 | self.report.merge(Portfolio.report) |
43 | date = datetime.now() | 44 | date = datetime.datetime.now() |
44 | if self.args.report_path is not None: | 45 | if self.args.report_path is not None: |
45 | self.store_file_report(date) | 46 | self.store_file_report(date) |
46 | if self.pg_config is not None and self.args.report_db: | 47 | if self.pg_config is not None and self.args.report_db: |