mirror of
https://github.com/archtechx/jobpipeline.git
synced 2025-12-13 20:44:04 +00:00
update README
This commit is contained in:
parent
ef4ded6e4e
commit
96184f5a76
1 changed files with 2 additions and 14 deletions
16
README.md
16
README.md
|
|
@ -68,14 +68,7 @@ JobPipeline::make([
|
||||||
})->shouldBeQueued(true)
|
})->shouldBeQueued(true)
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to push the job to a different queue, you can pass a string as a parameter, instead of a boolean: `shouldBeQueued('another-queue')`.
|
If you want to push the job to a different queue, you can pass a string as a second parameter:
|
||||||
|
|
||||||
The following methods are available too, for further configuration if needed:
|
|
||||||
- `onConnection(string $connection)`
|
|
||||||
- `onQueue(string $queue)`
|
|
||||||
- `timeout(int $timeoutInSeconds)`
|
|
||||||
- `delay($delay)`
|
|
||||||
- `tries($tries)`
|
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -90,12 +83,7 @@ JobPipeline::make([
|
||||||
SeedDatabase::class,
|
SeedDatabase::class,
|
||||||
])->send(function (TenantCreated $event) {
|
])->send(function (TenantCreated $event) {
|
||||||
return $event->tenant;
|
return $event->tenant;
|
||||||
})->shouldBeQueued(true)
|
})->shouldBeQueued(true, 'another-queue');
|
||||||
->onConnection('connection-different-from-default')
|
|
||||||
->onQueue('queue-different-from-default')
|
|
||||||
->timeout(180)
|
|
||||||
->delay(15)
|
|
||||||
->tries(2);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, convert the pipeline to a listener and bind it to an event:
|
Finally, convert the pipeline to a listener and bind it to an event:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue