fix: make sure to check body with hashed queue task name
This commit is contained in:
@@ -78,25 +78,16 @@ export async function queueTask(
|
||||
.digest("hex"),
|
||||
);
|
||||
console.log(hashedTaskName);
|
||||
console.log(
|
||||
{
|
||||
...task,
|
||||
name: hashedTaskName,
|
||||
},
|
||||
{
|
||||
...task,
|
||||
name:
|
||||
task.name.split("/").slice(0, -1).join("/") +
|
||||
"/" +
|
||||
hashedTaskName,
|
||||
},
|
||||
);
|
||||
const { res } = await queueCloudTask({
|
||||
...task,
|
||||
name:
|
||||
task.name.split("/").slice(0, -1).join("/") + "/" + hashedTaskName,
|
||||
});
|
||||
if (!res.ok) {
|
||||
if (await checkIfTaskExists(env, queueName, hashedTaskName, body)) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new FailedToQueueTaskError(res.status, await res.text());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user