ASP.NET CORE Configuring multiple Coravel queues

449 Views Asked by At

In my asp.net core 3.1 webapp I'm using Coravel. I'm struggling to find a way to have multiple queues (eg. one for each user company) to execute different long time operations in background at the same time.

I'm currently invoking these operations in my controllers methods using something like this:

 _queue.QueueInvocableWithPayload<FileImporterInvokable, ImporterModel>(new ImporterModel
        {
            FilePath = filePath,
            JobId =jobId
        });

At the moment, everything runs fine but every user has to wait until the current running task is completed before the server starts a new task. Since they can take several minutes to complete this can represent a problem.

How can I execute multiple background tasks at the same time?

thanks in advance

0

There are 0 best solutions below