Skip to content

Commit f8d5b61

Browse files
authored
Update queues.md for innacurate "new QueueConfig" and QueueConfig::up (#334)
Fixes NativePHP/desktop#107 While in here, I double checked the `new QueueConfig()` instruction and realized that it couldn't work because `sleep` does not have a default for instantiation, only in `fromConfigArray()`.
1 parent 9fd41b0 commit f8d5b61

File tree

1 file changed

+2
-2
lines changed
  • resources/views/docs/desktop/2/digging-deeper

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ and stop workers, should you need to.
7171
use Native\DTOs\QueueConfig;
7272
use Native\Desktop\Facades\QueueWorker;
7373

74-
$queueConfig = new QueueConfig(alias: 'manual', queuesToConsume: ['default'], memoryLimit: 1024, timeout: 600);
74+
$queueConfig = new QueueConfig(alias: 'manual', queuesToConsume: ['default'], memoryLimit: 1024, timeout: 600, sleep: 5);
7575

7676
QueueWorker::up($queueConfig);
7777

7878
// Alternatively, if you already have the worker config in your config/nativephp.php file, you may simply use its alias:
79-
QueueWorker::up(alias: 'manual');
79+
QueueWorker::up(config: 'manual');
8080

8181
// Later...
8282
QueueWorker::down(alias: 'manual');

0 commit comments

Comments
 (0)