diff options
Diffstat (limited to 'python/book_bbg.py')
| -rw-r--r-- | python/book_bbg.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/python/book_bbg.py b/python/book_bbg.py index ddab7f7b..0f5c6990 100644 --- a/python/book_bbg.py +++ b/python/book_bbg.py @@ -49,13 +49,7 @@ def bond_booking_process(file_handle, index): line = {"bbg_ticket_id": index, **row} trade = BondDeal.from_bbg_line(line) trade.stage() - try: - BondDeal.commit() - except UniqueViolation as e: - print(e) - BondDeal._conn.rollback() - BondDeal._bbg_insert_queue.clear() - BondDeal._insert_queue.clear() + BondDeal.commit() def get_bbg_id(name): @@ -70,7 +64,6 @@ if __name__ == "__main__": for f in sftp.client.listdir_iter("/"): if S_ISREG(f.st_mode): if "BOND" in f.filename: - print(BondDeal._cache) if (bbg_id := get_bbg_id(f.filename)) not in BondDeal._cache: with sftp.client.open(f.filename) as fh: bond_booking_process(fh, bbg_id) |
