Cloudflare DevelopersCD
Cloudflare Developers16mo ago
1 reply
pat

Hey fellows, I've got a really simple

Hey fellows, I've got a really simple queues and d1 setup that is deployed as a worker. It is a consumer and a producer of the job that it handles. It basically uses the default wrangler.toml and I followed the tutorials on the respective page to set it up. The fetch just publishes a single event, the queue just logs it

export default {
    async fetch(request: Request<unknown, IncomingRequestCfProperties<unknown>>, env: Env, ctx: ExecutionContext): Promise<Response> {
        await env.aramDataCollectionQueue.send({
            riot_puuid: "secret",
            region: RegionGroups.SEA
        })

        return new Response("Success");
    },

    queue(batch: MessageBatch<CollectAramDataJob>, env: Env, ctx: ExecutionContext): void | Promise<void> {
        console.log(batch);
    }
} satisfies ExportedHandler<Env, CollectAramDataJob>


I am trying to develop locally with bunx wrangler dev but when I go to the url it runs on it just hangs for a while with no error output. After a reasonable amount of time it will start lagging out my computer and starts spamming to console

[wrangler:inf] GET / 500 Internal Server Error (78202ms)


I am very new to cloudflare in general but I couldnt find anything in the docs
Was this page helpful?