G
G
Glory2021-05-28 11:31:02
Laravel
Glory, 2021-05-28 11:31:02

Is it better to implement the artisan command with cron through queues?

In laravel, you can configure the execution of tasks on a schedule. In this case, the cron runs the commands specified in the Kernel.
Now we have noticed that once an hour the load on the server increases strongly.
$schedule->command('priceUpdate')->hourly(); - most likely this command is executed.

How to make it so that the server gets softer and so that it is not loaded by 98%?

deploy Redis and run this task through queues?

Or create a "Queue" object, and run a command through shedule that would call this queue and run it through Redis, for example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kuznetsov, 2021-05-28
@besogonskiy

How to make it so that the server gets softer and so that it is not loaded by 98%?

In addition to optimizing queries / team work, nothing will help. Whatever queue service you use, if the task is time-consuming, then it will be long and difficult to complete.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question