fix: make sure to check body with hashed queue task name

This commit is contained in:
2024-10-23 09:00:39 -04:00
parent 1869771716
commit f8889eb550

View File

@@ -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());
}
}