Skip to content

Commit 46b7f75

Browse files
authored
feat/queue-sleep-option-config | add sleep info to queues doc (#125)
1 parent b518230 commit 46b7f75

File tree

1 file changed

+4
-0
lines changed
  • resources/views/docs/desktop/1/digging-deeper

1 file changed

+4
-0
lines changed

resources/views/docs/desktop/1/digging-deeper/queues.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Once you publish the NativePHP config file using `php artisan vendor:publish`, y
3131
'queues' => ['high'],
3232
'memory_limit' => 1024,
3333
'timeout' => 600,
34+
'sleep' => 3,
3435
],
3536
'four' => [
3637
'queues' => ['high'],
@@ -52,8 +53,11 @@ If you do not provide values for any of these settings, the following sensible d
5253
'queues' => ['default'],
5354
'memory_limit' => 128,
5455
'timeout' => 60,
56+
'sleep' => 3,
5557
```
5658

59+
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.
60+
5761
### Managing workers
5862

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

0 commit comments

Comments
 (0)