Skip to content

Include sleep info in queues doc #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions resources/views/docs/desktop/1/digging-deeper/queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Once you publish the NativePHP config file using `php artisan vendor:publish`, y
'queues' => ['high'],
'memory_limit' => 1024,
'timeout' => 600,
'sleep' => 3,
],
'four' => [
'queues' => ['high'],
Expand All @@ -52,8 +53,11 @@ If you do not provide values for any of these settings, the following sensible d
'queues' => ['default'],
'memory_limit' => 128,
'timeout' => 60,
'sleep' => 3,
```

The `sleep` parameter defines the number of seconds the worker will wait (sleep) when there are no new jobs available. A lower value means the worker polls for new jobs more frequently, which might be more responsive but uses more CPU. A higher value reduces CPU usage but may introduce a slight delay in processing newly added jobs.

### Managing workers

The handy `QueueWorker::up()` and `QueueWorker::down()` methods available on `Facades\QueueWorker` can be used to start
Expand Down