Package Data | |
---|---|
Maintainer Username: | therezor |
Maintainer Contact: | rnagirnyi@smartcats.pro (Roman Nagirnyi) |
Package Create Date: | 2018-02-26 |
Package Last Update: | 2024-04-26 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-24 15:01:33 |
Package Statistics | |
---|---|
Total Downloads: | 388,375 |
Monthly Downloads: | 5,058 |
Daily Downloads: | 238 |
Total Stars: | 45 |
Total Watchers: | 3 |
Total Forks: | 8 |
Total Open Issues: | 1 |
By using this package you easily dispatch jobs inside transactions. Cancel job on transaction rollback. Add to queue on transaction committed.
This package requires PHP 7.1 and Laravel 5.8 or higher. If you are on a PHP version below 7.1 or a Laravel version below 5.8 just use an older version of this package.
Run composer require therezor/laravel-transactional-jobs
in your laravel project root folder
Implement TheRezor\TransactionalJobs\Contracts\RunAfterTransaction
to jobs that run in the middle of database transactions
<?php
use TheRezor\TransactionalJobs\Contracts\RunAfterTransaction;
class MySuperJob implements ShouldQueue, RunAfterTransaction
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
...
}