2

I'm currently working on a plug-in for Craft. I have to work with a lot of data and, some steps are slow. So that's why I added them to a job system. This job is doing a lot of stuff.

That job is blocking the other jobs that are also important. Is there a way to push a new job to the top of the list and start it directly in Craft 3?

I tried to priority tasks (https://craftcms.com/docs/3.x/extend/queue-jobs.html#specifying-priority) and, it didn't work.

1

The priority option is for setting the jobs in priority order before they start. A job that is already running will not be interrupted for a more important one.

I would suggest setting up another queue for the longer tasks. That way, your smaller tasks can continue to run separate to the more demanding ones.

There is some guidance on how to do this on an issue here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.