aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/report_ops/__main__.py12
-rw-r--r--python/report_ops/wires.py7
2 files changed, 7 insertions, 12 deletions
diff --git a/python/report_ops/__main__.py b/python/report_ops/__main__.py
index 3285f5e5..94b670be 100644
--- a/python/report_ops/__main__.py
+++ b/python/report_ops/__main__.py
@@ -94,11 +94,13 @@ if args.cash_reports or args.wire_reports:
logger.warning(e)
if args.wire_reports:
wire_report = WireReport[custodian]
- # try:
- wire_report.to_db(args.date, fund)
- # except (MissingDataError, RuntimeError) as e:
- # logger.warning(e)
-
+ try:
+ for row in wire_report.yield_rows(args.date, fund):
+ wire = wire_report.from_report_line(row | {"fund": fund})
+ wire.stage()
+ wire.commit()
+ except (MissingDataError, RuntimeError) as e:
+ logger.warning(e)
if args.isosel_reports:
for fund in ("ISOSEL",):
diff --git a/python/report_ops/wires.py b/python/report_ops/wires.py
index 13834410..b84331cd 100644
--- a/python/report_ops/wires.py
+++ b/python/report_ops/wires.py
@@ -97,13 +97,6 @@ class WireReport(Report, table_name="custodian_wires"):
conn.commit()
cls._insert_queue.clear()
- @classmethod
- def to_db(cls, date, fund):
- for line in cls.yield_rows(date, fund):
- trade = cls.from_report_line(line | {"fund": fund})
- trade.stage()
- cls.commit()
-
class BNYWireReport(WireReport, custodian="BNY", dtkey="%Y%m%d%H%M%S"):
@classmethod