• Extensions
  • Database Queue - the simplest queue, even for shared hosting

Is it just a really weird coincidence that the database scheduler on my forum stopped working on this day today of all days? Even without the upgrade

1.0.2

  • full fix for failed jobs not being displayed correctly
Updating
composer require blomstra/database-queue:"*"
php flarum cache:clear
    a month later

    IanM glad to see the queue extension moved to an official extension, thank you 🙂

    When I used to invoke the queue using flarum queue:work, there were some arguments it supported I think such as --sleep, --tries, --memory, is it possible/necessary to configure those still if upgrading and allowing the scheduler to invoke the queue? Reason being, I need to ensure it has enough memory and by default I believe it's granted 128 MB, but I need to bump that up.

      ctml you make a very good point actually. No, at present it does not support the additional args. It's easy enough to expose these as extensions settings, I'll get this added 🙂

      2 months later

      IanM Hi, I'm a little confused. You mentioned that no cron is required anymore. But the documents still say:

      Set up

      Go into your hosting control panel and set up the following task to run every minute:

      php flarum schedule:run
      Or in cron language:

      • * * * * cd /path/to/flarum && php flarum schedule:run

      Is it the documents/readme that haven't been updated? Just want to make sure things are setup correctly. (I just updated flarum and its extensions).

        xasharma Redis is a different implementation of queues. It's either use Redis or DB queues.

          xasharma

          luceos What is the difference with blomstra/flarum-redis?
          The redis package (it's officially not an extension) is meant for larger communities. Redis offers the ability to scale the number of workers up however you need. Running a queue worker which pulls jobs from the database can also negatively impact your community performance when processing a lot of notifications and other queue tasks.

            a month later

            Today I entered in the Flarum admin where in the Dashboard I see 12 failed job.
            This are reported same in two communities.
            How to know what this failed job are?

              luceos thanks.
              flmaqueue_failed_jobs

              I found the records and those seems to be old by February 2024 so maybe... the plugin queue still showing me old things already resolved. I will delete this from the database.

              A UI for that will be useful and also a way to clean errors 🙂