]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/blobdiff - store.py
Add logging at market instance creation
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git] / store.py
index b3ada4567e38a28613efd0159dafd33ece105a0d..2b5c18a1a1a65eb241af2677d322195a5202d18d 100644 (file)
--- a/store.py
+++ b/store.py
@@ -209,6 +209,17 @@ class ReportStore:
             "action": action,
             })
 
+    def log_market(self, args, user_id, market_id, report_path, debug):
+        self.add_log({
+            "type": "market",
+            "commit": "$Format:%H$",
+            "args": vars(args),
+            "user_id": user_id,
+            "market_id": market_id,
+            "report_path": report_path,
+            "debug": debug,
+            })
+
 class BalanceStore:
     def __init__(self, market):
         self.market = market