Skip to content

Commit 8a9ed8c

Browse files
authored
fix: task name set to none (#1319)
1 parent 1e7f3a9 commit 8a9ed8c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/src/shared/common/gcp_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def create_http_task_with_name(
8383
logging.info("Queue parent path: %s", parent)
8484

8585
task = tasks_v2.Task(
86-
name=f"{parent}/tasks/{task_name}",
86+
# If task_name is provided, it will be used; otherwise, a unique name will be generated.
87+
# This is useful for deduplication purposes.
88+
name=f"{parent}/tasks/{task_name}" if task_name else None,
8789
schedule_time=task_time,
8890
http_request=tasks_v2.HttpRequest(
8991
url=url,

0 commit comments

Comments
 (0)