Skip to content

Commit

Permalink
(PC-34421)[API] fix: Received cloud task log always show null queue n…
Browse files Browse the repository at this point in the history
…ame and task id

(cherry picked from commit 818ac95)
  • Loading branch information
prouzet-pass committed Feb 6, 2025
1 parent b57caf5 commit e475daa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/src/pcapi/tasks/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def _define_handler(
@cloud_task_api.route(path, methods=["POST"], endpoint=path)
@spectree_serialize(on_success_status=204)
def handle_task(body: payload_type) -> None: # type: ignore[valid-type]
queue_name = request.headers.get("HTTP_X_CLOUDTASKS_QUEUENAME")
task_id = request.headers.get("HTTP_X_CLOUDTASKS_TASKNAME")
# Documentation: https://cloud.google.com/tasks/docs/creating-http-target-tasks?hl=fr#handler
queue_name = request.headers.get("X-CloudTasks-QueueName")
task_id = request.headers.get("X-CloudTasks-TaskName")
retry_attempt = request.headers.get("X-CloudTasks-TaskRetryCount")

job_details = {
Expand Down

0 comments on commit e475daa

Please sign in to comment.