Skip to content

Invalid Consumer when checking max retry duration #56

Description

@mbreithu-wtd

In v3.x in TaskHandler.php:111 you are calling:

$job->setRetryUntil(CloudTasksApi::getRetryUntilTimestamp($taskName));

Problem is that you are only passing in the taskId from the header: "x-cloudtasks-taskname"
The CloudTaskApi needs the constructed task name like:
projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

It works by creating the taskName with:
$taskName = request()->header('X-Cloudtasks-Taskname'); $queue = $job->getQueue() ?: $this->config['queue']; $name = $this->client->taskName($this->config['project'], $this->config['location'], $queue, $taskName);

I think that line got lost in the update from v2 to v3 of this package since the task name is constructed that way in v2.

Kind regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions