diff options
| -rw-r--r-- | python/process_queue.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/process_queue.py b/python/process_queue.py index e03164f1..71e0fe26 100644 --- a/python/process_queue.py +++ b/python/process_queue.py @@ -32,6 +32,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 _client_name = {"SERCGMAST": "Serenitas", "BOWDST": "HEDGEMARK", "BRINKER": "LMCG"} @@ -83,6 +84,11 @@ def process_indicative( fund in ("SERCGMAST", "BOWDST") or trade_type in ("cds", "swaption") ): p.rpush(f"{trade_type}_upload", dumps(trade)) + if ( + (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"],), conn) p.delete(trade_type) |
