quirrel-dev / quirrel

The Task Queueing Solution for Serverless.
https://quirrel.dev
MIT License
892 stars 67 forks source link

functions enqueue and delete throwing Timeout error #1176

Closed affcue25 closed 2 months ago

affcue25 commented 2 months ago

Bug Report

Current Behavior We are trying to enqueue or delete the job but it throws timeout error after 10 sec of wait. It was working fine before but now its causing this issue and we have not change anything. Its causing this issue on either of functions.

Input Code Heres the code snippet:

await remindersQueue.delete(id)

await remindersQueue.enqueue(
              { id, input },
              {
                id: id,
                override: true,
                runAt: new Date(timeStr),
                repeat: {
                  every: '1d',
                },
              }
            )

Expected behavior/code It should queue the job as it was doing before but now its not working as expected. I am using it with redwood

import { Queue } from 'quirrel/redwood'

export const handler = Queue(
  '.netlify/functions/sendReminders',
  async (params: any, params2: any) => {
  //my logic to send email to users
  })

Environment

Please guide me here if you have change anything.

affcue25 commented 2 months ago

Its related to my Fly.io configuration. I migrate it using this doc https://dev.to/remixtape/self-hosting-quirrel-5af7 but I cant understand the URL in the last command to get QUIRREL_TOKEN curl --user ignored:paste_quirrel_passphrase_here -X PUT https://quirrel.fly.dev/tokens/exampleapp

Can you please help me here, what should be the URL https://quirrel.fly.dev/tokens/exampleapp?

affcue25 commented 2 months ago

Resolved it. I was passing wrong port 9181 instead of 6379 in flyctl secrets set "REDIS_URL=redis://:paste_redis_password_here@cdg.quirrel-redis.internal:9181?family=6" And I had to create fresh quirrel redis-quirrel instances.

Make sure to pass 6379 as quirrel-redis PORT. My new Quirrel is working now for enqueue() and delete() functions.