aboutsummaryrefslogtreecommitdiffstats
path: root/python/process_queue.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/process_queue.py')
-rw-r--r--python/process_queue.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/process_queue.py b/python/process_queue.py
index 51e4302b..c03a8607 100644
--- a/python/process_queue.py
+++ b/python/process_queue.py
@@ -320,10 +320,9 @@ def process_list(p: redis.client.Pipeline, key: str, upload: bool) -> None:
trades = get_trades(p, key)
if trade_type in ["bond", "cds", "swaption"]:
process_fun = globals()[f"{trade_type}_trade_process"]
- with init_bbg_session(BBG_IP) as session:
- trades = (process_fun(dawndb, session, trade) for trade in trades)
+ trades = [process_fun(dawndb, session, trade) for trade in trades]
if trade_type == "bond" and fund == "SERCGMAST":
- trades = (send_email(trade) for trade in trades)
+ trades = [send_email(trade) for trade in trades]
if fund == "SERCGMAST" or trade_type in ("cds", "swaption"):
try:
buf = generate_csv(
@@ -680,6 +679,7 @@ def bond_trade_process(conn, session, trade):
c.execute(
sqlstr, (trade["trade_date"], trade["identifier"], trade["price"])
)
+ conn.commit()
return trade