quirrel
quirrel copied to clipboard
Quirrel & Blitzjs not working
Bug Report
Current Behavior The event starts to execute, but in the end, api do not receive a request

Input Code
https://github.com/rahmonzoda/quirrel-test
for demonstration, I created a new blitsjs project according to the instructions
https://docs.quirrel.dev/getting-started/next-js
blitz install quirrel
I also used docker version, same result
export default Queue(
"api/greetingsQueue", // the path of this API route
async ({ to, message }: Greetings) => {
console.log(`Greetings, ${to}! Thy ears shall hear: "${message}"`)
}
)
export default async function enqueueGreeting() {
await greetingsQueue.enqueue({
to: "Sandy Cheeks",
message: "Howdy!",
})
}
Expected behavior/code
console.log(Greetings, Sandy Cheeks! Thy ears shall hear: "Howdy!"
)
Environment
- Quirrel version: [v1.8.1]
- Node/npm version: [v17.9.0, npm v8.7.0]
Possible Solution
Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.
Taking a look :eyes:
Working fine for me with your repo. Did you change Blitz' port by chance?
You're right, now it works for me too. Strange, I must be missing something important, but I don’t understand what
I need a https
for testing, but I set
QUIRREL_BASE_URL=https://192.168.0.13:3000
no other changes
yeah, that could be related to it. have you tried opening that URL in the browser? I don't think the Blitz Dev server has HTTPS support
I wrote my custom server.
I have been writing the project for several weeks, but Quirrel
installed a few days ago
I removed custom server and use default, but still same result
what are the debugging tools for this? logs?
In any case, thank you for the Quirrel and Blitz are excellent libraries, I'm still poking around. What is happening.
The Quirrel server calls QUIRREL_BASE_URL + {queue}
. So for this, it'd call https://192.168.0.13:3000/api/hourlyCron
. You can try verifying that you can call this endpoint from the browser / via cURL.
Yeah, it works if just go through browser
that's interesting. this is the line where the executing job
log you're seeing is emitted:
https://github.com/quirrel-dev/quirrel/blob/153299597118e8af30277a6c2fae09762a8fa638/src/api/worker/index.ts#L86
it should print "execution done" after the request is done:
https://github.com/quirrel-dev/quirrel/blob/153299597118e8af30277a6c2fae09762a8fa638/src/api/worker/index.ts#L143
but it looks like it's hanging somewhere between
I rolled back to v14.11.0 node version and it looks like start working
version v17.9.0 still not working
that's weird. I don't have an idea what's causing this. if you find out, let me know and I'll fix.