Is there a way to discard the backlog queue on workflows (i.e. simply delete or cancel all the "queu
Is there a way to discard the backlog queue on workflows (i.e. simply delete or cancel all the "queued" workflows)?
pause the workflow from within a workflow instance, like calling the workflow binding and then resuming the workflow from a webhook or something like thatconst wf = await MY_WORKFLOW.get(id) and then await wf.status() should return errors, but they are always empty.An RPC stub was not disposed properly. You must call dispose() on all stubs in order to let the other side know that you are no longer using them. You cannot rely on the garbage collector for this because it may take arbitrarily long before actually collecting unreachable objects. As a shortcut, calling dispose() on the result of an RPC call disposes all stubs within it.step.do expects to return Rpc.Serializable<unknown>, so I did a little bit of reading about the RPC lifecycle here and found that in the context of Worker Service Bindings, you should either use the experimental using syntax, or explicitly call object[Symbol.dispose](). step.do, and not others. If someone could provide some insight as to what's going on, that would be great. Happy to provide more details also

sleep locally with a number value, it treats it like ms instead of secondssleep it's seconds not msreturn?NonRetryableError 
Cf-Resized header is null and the Content-Type header is un-changed (image/jpeg).worker.dev domain, this is in the expected zone (but on a sub-domain). I have confirmed that Image Transformations are working with another worker within the same zone, so the only thing difference is the use of a Workflow. Is there something that I'm missing here? Thanks!fetch().#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Check if workflow name and status are provided
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <workflow-name> <status>"
echo "Status can be: queued, running, succeeded, failed"
exit 1
fi
WORKFLOW_NAME="$1"
STATUS="$2"
while true; do
# Get workflow instances with specified status
output=$(npx wrangler workflows instances list "$WORKFLOW_NAME" --status="$STATUS" 2>/dev/null)
ids=$(echo "$output" | awk -F '│' '{gsub(/ /, "", $2); if ($2 ~ /^[a-f0-9-]+$/) print $2}')
instance_count=$(echo "$ids" | wc -w | tr -d ' ')
if [ "$instance_count" -eq 0 ]; then
echo "No more instances found with status '$STATUS'"
break
fi
echo "Found $instance_count instances with status '$STATUS'"
# Process in batches
BATCH_SIZE=5
echo "$ids" | xargs -n$BATCH_SIZE -P$BATCH_SIZE -I{} sh -c '
id="$1"
workflow="$2"
if ! npx wrangler workflows instances terminate "$workflow" "$id" >/dev/null 2>&1; then
echo "Failed to terminate instance $id"
exit 1
fi
echo "Terminated $id"
' -- {} "$WORKFLOW_NAME"
echo "Batch complete, checking for remaining instances..."
done
echo "Done terminating all instances"while (true) {
const isDone = await checkIfSomethingIsDone()
if (isDone) break;
step.sleep('wait for event', '5 minutes');
}export class MyWorkflow extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
step.do('Step 1', async () => { return 'Step 1 finished!'; });
step.do('Step 2', {
retries: { limit: 2, delay: '1 second', backoff: 'linear', },
}, async () => {
console.log('Trying Step 2');
throw new NonRetryableError('Step 3 failed. Non-retryable');
});
}
}An RPC stub was not disposed properly. You must call dispose() on all stubs in order to let the other side know that you are no longer using them. You cannot rely on the garbage collector for this because it may take arbitrarily long before actually collecting unreachable objects. As a shortcut, calling dispose() on the result of an RPC call disposes all stubs within it.Worker "workflows:workflow"'s binding "USER_WORKFLOW" refers to service "core:user:" with a named entrypoint "ExcelImportWorkflow", but "core:user:" has no such named entrypoint.
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at Miniflare2.#assembleAndUpdateConfig (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1403:10)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Mutex.runWith (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/workers/shared/sync.ts:66:45)
at Miniflare2.#waitForReady (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1485:3)
at Miniflare2._getProxyClient (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1691:3)
at Miniflare2.getBindings (/home/roboto/devel/portcity/cf-hono-remix/node_modules/miniflare/src/index.ts:1714:23)
at getPlatformProxy (/home/roboto/devel/portcity/cf-hono-remix/node_modules/wrangler/src/api/integrations/platform/index.ts:118:24)
at configureServer (/home/roboto/devel/portcity/cf-hono-remix/node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:55:11)
at _createServer (file:///home/roboto/devel/portcity/cf-hono-remix/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:63230:20)
at configResolved (/home/roboto/devel/portcity/cf-hono-remix/node_modules/@remix-run/dev/dist/vite/plugin.js:768:27) {
code: 'ERR_RUNTIME_FAILURE',
cause: undefinedasync run(event: WorkflowEvent<Params>, step: WorkflowStep) {
await context.run({ id: "124" }, async () => {
// loadFile will get undefined when calling content.getStore()
const txt = await step.do("load", loadFile);
const txt2 = await step.do("load2",
// this one will work
async()=>console.log(context.getStore().id));
});
} const image = await fetch(imageUrl, {
cf: {
image: {
format: "webp",
},
},
});
console.log(
"Image headers, post-transform",
image.headers.get("Cf-Resized"),
image.headers.get("Content-Type"),
);