RomainLanz / adonis-bull-queue

Queue system based on BullMQ for AdonisJS
MIT License
129 stars 24 forks source link

How to use this package in the real world #4

Open Barbapapazes opened 2 years ago

Barbapapazes commented 2 years ago

Hello,

I'm trying to run some cron actions. These actions a super simple, it's just a trigger of a command build using ace.

First, I do not know if i should use crontab from linux, a package like adonis5-schedule or this package.

I've tried adonis5-schedule and I do not know how to use it in production (i.e.: how to stop jobs when reploying my application. For this package, I can use the feature repeat from bull-mq but how to setup these in Adonis? I tried a prldfile but each time the server wake up, a new worker is created which is not what I want and I do not know how to manage this in production? Should I run node ace queue:listen using pm2? That's hard to understand the purpose of this package and the problem solved.

So I think crontab is the best solution actually?

Laravel have a tasks scheduler with a lot of feature and documentation. Could we expect the same with Adonis6?

Barbapapazes commented 9 months ago

Hello myself,

I will use this for a project, so this will allow me to try the package and give it to community as example (if it works).

Barbapapazes commented 9 months ago

How do you handle the queue (and the process node ace queue:listen in production?

Barbapapazes commented 9 months ago

Hello @RomainLanz, I've updated my issue. I've tried this package for a real world application and I've now a lot of question.