Skip to content

Invalid Consumer when checking max retry duration #56

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Closed
mbreithu-wtd opened this issue Jun 20, 2022 · 1 comment
Closed

Invalid Consumer when checking max retry duration #56

mbreithu-wtd opened this issue Jun 20, 2022 · 1 comment

Comments

@mbreithu-wtd
Copy link

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

@marickvantuil
Copy link
Member

Fixed in v3.1.4

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants