Skip to main content

Monitor Backend workers

The container octree/voca-backend can start workers to install new Decidim. We use twp queues:

  • main for fast operations, like renaming a domain, or updating settings
  • installfor long running queue, mostly for parking new decidim (that can take up to 30min).

These queues are started though BullMQ workers, with the strapi context. This allow the queue to access the content of the strapi data, and still run asyncronous tasks. When errors araise in these queues, it is sometimes hard to see them, so we have ny default a bullMq dashboard served under the queue https://<voca url>/_jobs.

This dashboard can optionally be secured by a Basic Auth, using BULLMQ_PASSWORD and BULLMQ_USERNAME in the backend environment variables.

Once you are on the queue dashboard, you can see four available states:

  • Delayed: tasks enqueued, but that are not ready yet to be executed.
  • Waiting: tasks that are ready to run and wait for the worker to be available
  • Failed: tasks that have failed too many times (more than 15 times) OR tasks that have raise an.Unrecoverable Error (for example: the environment they try to set does not exists).
  • Active: the task that is running actually.

The BullMQ dashboard scan the redis database, thus you can run as many workers as you want, and see the excecution of all of them in the dashboard. That is mostly the same behavioiur as sidekiq/web for who comes from Ruby on Rails.