diff options
Diffstat (limited to 'python/process_queue.py')
| -rw-r--r-- | python/process_queue.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/process_queue.py b/python/process_queue.py index 0fc42966..9c3143fb 100644 --- a/python/process_queue.py +++ b/python/process_queue.py @@ -30,7 +30,7 @@ from typing import Tuple, Union from quantlib.time.api import pydate_from_qldate, UnitedStates, Days, Date from tabulate import tabulate from headers import get_headers, get_termination_headers -from mtm_upload import upload_mtm_trades +from mtm_upload import mtm_process_upload _client_name = {"SERCGMAST": "Serenitas", "BOWDST": "HEDGEMARK", "BRINKER": "LMCG"} @@ -78,6 +78,7 @@ def process_indicative( for trade in get_trades(p, trade_type): process_fun(conn, session, trade) fund = trade["fund"] + mtm_uploads = [] if trade.get("upload", True) and ( fund in ("SERCGMAST", "BOWDST") or trade_type in ("cds", "swaption") ): @@ -86,7 +87,8 @@ def process_indicative( (trade_type == "cds" and trade.get("attach")) or (trade_type == "swaption" and trade.get("swap_type", "CD_INDEX_OPTION")) ) and trade.get("upload", True): - upload_mtm_trades(trade_type, trade["id"]) + mtm_uploads.append(trade["id"]) + mtm_process_upload(mtm_uploads, trade_type) p.delete(trade_type) |
