DC
CDCloudflare Developers
•Created by DC on 11/6/2023 in #workers-help
Is it possible to have no routes associated to a worker?
I have a worker that will act as a consumer for a queue. It will also have a cron function. As such it does not need a route. I have removed the route from the dashboard, but it gets re-added on deployment.
Does anyone know, is there a setting in the wrangler file to tell CF not to generate an active route?
Many thanks...
4 replies
CDCloudflare Developers
•Created by DC on 11/1/2023 in #workers-help
multiple producers
Hello everyone. I am trying to build a worker which takes in requests via an API and the pushes to a queue of a dedicated worker. According to the documents, a worker can be the producer for many queues. However, I am not able to get it to bind. I cannot see an exact example so have copied the example for multiple KV stores.
queues.producers = [
{queue = "xyz-process-queue", binding = "WORKER_QUEUE"},
{queue = "xyz-log-queue", binding = "QUEUE_LOG"},
]
The toml file seems to be happy and deploys, although the cloudflare dashboard does not recognize the QUEUE_LOG as having a producer.
In the code, I have:
export interface Env {
WORKER_QUEUE: Queue;
QUEUE_LOG: Queue;
}
Does anyone have any thoughts on what I might be missing here? If I console.log env.QUEUE_LOG it is null.
I am grateful for any thoughts....
DC
8 replies