From acad44aa437f46a19a59cd68967c35fec0c3e53c Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Mon, 10 Nov 2025 18:05:42 -0500 Subject: [PATCH] fixes from bot reivew --- backend/handler/redis_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/handler/redis_handler.py b/backend/handler/redis_handler.py index 5b0e38d3e..796a42537 100644 --- a/backend/handler/redis_handler.py +++ b/backend/handler/redis_handler.py @@ -59,18 +59,18 @@ sync_cache = __get_sync_cache() async_cache = __get_async_cache() -def get_job_func_name(job: Job, fallback: str = "") -> str | None: +def get_job_func_name(job: Job, fallback: str = "") -> str: """Safely get the function name from an RQ job, handling DeserializationError. Args: job: The RQ Job object to get the function name from - fallback: The value to return if deserialization fails (default: "unknown_task") + fallback: The value to return if deserialization fails Returns: The function name if available, otherwise the fallback value """ try: - return job.func_name + return job.func_name or fallback except DeserializationError: # Job data cannot be deserialized (e.g., function no longer exists) return fallback