1
0
Fork 0
mirror of https://github.com/archtechx/jobpipeline.git synced 2025-12-12 20:24:03 +00:00

update README

This commit is contained in:
Jonathan Martins 2023-03-02 14:21:14 -03:00
parent ef4ded6e4e
commit 96184f5a76

View file

@ -68,14 +68,7 @@ JobPipeline::make([
})->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')`.
The following methods are available too, for further configuration if needed:
- `onConnection(string $connection)`
- `onQueue(string $queue)`
- `timeout(int $timeoutInSeconds)`
- `delay($delay)`
- `tries($tries)`
If you want to push the job to a different queue, you can pass a string as a second parameter:
```php
<?php
@ -90,12 +83,7 @@ JobPipeline::make([
SeedDatabase::class,
])->send(function (TenantCreated $event) {
return $event->tenant;
})->shouldBeQueued(true)
->onConnection('connection-different-from-default')
->onQueue('queue-different-from-default')
->timeout(180)
->delay(15)
->tries(2);
})->shouldBeQueued(true, 'another-queue');
```
Finally, convert the pipeline to a listener and bind it to an event: