2017 © Pedro Peláez
 

library laravel-transactional-jobs

Sumbit laravel jobs inside transaction. Cancel job after rollback. Proceed after successful commit.

image

therezor/laravel-transactional-jobs

Sumbit laravel jobs inside transaction. Cancel job after rollback. Proceed after successful commit.

  • Tuesday, February 27, 2018
  • by therezor
  • Repository
  • 2 Watchers
  • 4 Stars
  • 1,513 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 88 % Grown

The README.md

Laravel transactional jobs

[!NOTE]
Laravel 10 and newer versions natively support transactional job handling without the need for this package., (*1)

Problem:

, (*2)

Solution:

, (*3)

By using this package you easily dispatch jobs inside transactions. Cancel job on transaction rollback. Add to queue on transaction committed., (*4)

Installation

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., (*5)

1) Run composer require therezor/laravel-transactional-jobs in your laravel project root folder, (*6)

2) Implement TheRezor\TransactionalJobs\Contracts\RunAfterTransaction to jobs that run in the middle of database transactions, (*7)

<?php

use TheRezor\TransactionalJobs\Contracts\RunAfterTransaction;

class MySuperJob implements ShouldQueue, RunAfterTransaction
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    ...
}

The Versions

27/02 2018

dev-master

9999999-dev

Sumbit laravel jobs inside transaction. Cancel job after rollback. Proceed after successful commit.

  Sources   Download

MIT

The Requires

 

by Roman Nagirnyi

27/02 2018

0.2

0.2.0.0

Sumbit laravel jobs inside transaction. Cancel job after rollback. Proceed after successful commit.

  Sources   Download

MIT

The Requires

 

by Roman Nagirnyi

26/02 2018

0.1

0.1.0.0

Sumbit laravel jobs inside transaction. Cancel job after rollback. Proceed after successful commit.

  Sources   Download

MIT

The Requires

 

by Roman Nagirnyi