Download the PHP package agatanga/relay without Composer
On this page you can find all versions of the php package agatanga/relay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download agatanga/relay
More information about agatanga/relay
Files in agatanga/relay
Package relay
Short Description A better way to create complex batch job queues in Laravel.
License MIT
Homepage https://github.com/agatanga/relay
Informations about the package relay
Relay
A better way to create and manage complex batch job queues in Laravel:
Main features
- Relay doesn't create/modify DB tables
- Clean looking complex batches
- Ability to set middleware for multiple jobs
- Search for specific batch via metadata
- Monitor batch progress
- Search for failed jobs
Installation
Usage Examples
Flatten nested callbacks
Here is a flattened batches written with Relay:
View the same code written without Relay
Middleware
Relay allows you to set middleware for multiple jobs:
Metadata
Before we start, you may want to know that Relay doesn't modify job_batches
table
to store metadata. All data is stored inside the name
column and limited to
255 chars. Here is how the name of the batch may look like with the metadata:
Now, let's see how to use meta
method to store additional information:
Then search for the batch and retrieve metadata value or name of the batch:
Progress
Let's assume that the search query from the section above returned the first
batch (then
and finally
callbacks are not yet started). Relay takes this into
account and will return the progress within 0-33%
range.
Failed Jobs
When batch job fails, Laravel adds a failed job record to the failed_jobs
table.
Relay allows you to retrieve these failed jobs:
All versions of relay with dependencies
illuminate/bus Version ^8.0|^9.0|^10.0|^11.0
illuminate/support Version ^7.14|^8.0|^9.0|^10.0|^11.0
laravel/serializable-closure Version ^1.0