(20260219) Updarted APIs to now show last-in time and loc also.

This commit is contained in:
2026-02-19 14:48:41 +05:30
parent 81021a4b38
commit d8aaf942b2
7 changed files with 360 additions and 218 deletions
+8 -6
View File
@@ -149,12 +149,13 @@ async def yesterday_cron(
await common.sync_attendance_to_tcaoff(
tcaoff_client = tcaoff_client,
cosec_in_out_summary = json.from_file(common.PREV_DAY_IN_OUT_SUMMARY_CACHE_FILE),
chunk_size = 10
)
# If something goes wrong in the COSEC step:
except Exception as exception:
err_printer(exception)
if test_mode: raise
# if test_mode: raise
# Log out of TCAOFF:
success = await tcaoff_client.logout()
@@ -164,7 +165,7 @@ async def yesterday_cron(
except Exception as exception:
err_printer(exception)
await tcaoff_client.logout()
if test_mode: raise
# if test_mode: raise
# ---------------------------------------------------------------------------------------------------------------------
@@ -246,18 +247,19 @@ async def today_cron(
await common.sync_attendance_to_tcaoff(
tcaoff_client = tcaoff_client,
cosec_in_out_summary = json.from_file(common.IN_OUT_SUMMARY_CACHE_FILE),
chunk_size = 10
)
# If something goes wrong in the COSEC step:
except Exception as exception:
err_printer(exception)
if test_mode: raise
# if test_mode: raise
# If something goes wrong:
except Exception as exception:
err_printer(exception)
await tcaoff_client.logout()
if test_mode: raise
# if test_mode: raise
# ---------------------------------------------------------------------------------------------------------------------
@@ -284,12 +286,12 @@ 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),
tcaoff_client = tcaoff_client,
# test_mode = test_mode
test_mode = test_mode
)
printer("Test Done")
return