diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/task_server/__main__.py | 4 | ||||
| -rw-r--r-- | python/task_server/globeop.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/python/task_server/__main__.py b/python/task_server/__main__.py index a5ccf8a9..2fb1f1e6 100644 --- a/python/task_server/__main__.py +++ b/python/task_server/__main__.py @@ -33,7 +33,7 @@ if args.download: for fund in ("SERCGMAST", "BOWDST"): download_data(engine, args.date, fund) elif args.upload: - time = datetime.datetime.now().time() - date = datetime.datetime.combine(args.date, time) for fund in ("SERCGMAST", "BOWDST"): + time = datetime.datetime.now().time() + date = datetime.datetime.combine(args.date, time) upload_data(engine, date, fund) diff --git a/python/task_server/globeop.py b/python/task_server/globeop.py index 0b9747cd..0fa225dc 100644 --- a/python/task_server/globeop.py +++ b/python/task_server/globeop.py @@ -205,14 +205,14 @@ def upload_bond_marks(engine, workdate: datetime.datetime, fund): ), ) df.rename(columns={"identifier": "IDENTIFIER", "price": "Price"}, inplace=True) - fullpath = DAILY_DIR / str(d) / f"securitiesNpv{workdate:%Y%m%d_%H%M%S}.csv" + fullpath = DAILY_DIR / str(d) / f"securitiesNpv{workdate:%Y%m%d_%H%M%S}_{fund}.csv" df.to_csv(fullpath, index=False) match fund: case "SERCGMAST": server = FtpClient.from_creds("globeop", folder="incoming") case "BOWDST": server = SftpClient.from_creds("hm_globeop", folder="incoming/gopricing") - server.put(fullpath) + server.put(fullpath, f"securitiesNpv{workdate:%Y%m%d_%H%M%S}.csv") logger.info("upload bond marks done") @@ -228,14 +228,14 @@ JOIN cds USING (security_id)""", fund, ), ) - fullpath = DAILY_DIR / str(d) / f"otcNpv{workdate:%Y%m%d}.csv" + fullpath = DAILY_DIR / str(d) / f"otcNpv{workdate:%Y%m%d}_{fund}.csv" df.to_csv(fullpath, index=False) match fund: case "SERCGMAST": server = FtpClient.from_creds("globeop", folder="incoming") case "BOWDST": server = SftpClient.from_creds("hm_globeop", folder="incoming/gopricing") - server.put(fullpath) + server.put(fullpath, f"otcNpv{workdate:%Y%m%d}.csv") logger.info("upload cds marks done") |
