(20260217) Ready to test on production now

This commit is contained in:
2026-02-17 15:26:19 +05:30
parent 64a6eac20f
commit 1fe8b1e68c
4 changed files with 26 additions and 8 deletions
+19 -3
View File
@@ -284,7 +284,7 @@ async def set_scheduler(
await yesterday_cron(
cosec_creds = copy.deepcopy(cosec_creds),
tcaoff_client = tcaoff_client,
# test_mode = test_mode
test_mode = test_mode
)
await today_cron(
cosec_creds = copy.deepcopy(cosec_creds),
@@ -342,6 +342,21 @@ async def set_scheduler(
if __name__ == "__main__":
# Parse args:
import argparse
ap = argparse.ArgumentParser()
ap.add_argument(
"--test",
action = "store_true",
default = False,
)
ap.add_argument(
"--verbose",
action = "store_true",
default = False,
)
args = ap.parse_args()
# Explicitly mention the expected file paths for other devs to maintain:
print("PROJ. DIR. :", common.PROJ_DIR)
print("COSEC CREDS :", common.COSEC_CREDS_FILE)
@@ -355,12 +370,13 @@ if __name__ == "__main__":
tcaoff_client = AsyncTheCAOffice(
username = tcaoff_creds["creds"]["username"],
password = tcaoff_creds["creds"]["password"],
debug_only_errors = False
debug = True,
debug_only_errors = False if args.verbose else True,
)
# Schedule the activities:
asyncio.run(set_scheduler(
cosec_creds = cosec_creds,
tcaoff_client = tcaoff_client,
test_mode = False
test_mode = args.test
))