Chain Laravel jobs without having to glue it to a starting job

Overview

Packagist Downloads Code size Build Status

Laravel Job Chainer

JobChainer does chain a variable amount of jobs by adding them with the add() method.

This makes it possible to chain jobs without having to know which job will be the first to be fired.

Normal job chaining

ProcessPodcast::withChain([
    new OptimizePodcast,
    new ReleasePodcast($argA, $argB)
])->dispatch($arg1);

With Job Chainer

$chain = new JobChainer;

$chain->add(ProcessPodcast::class, $arg1);
$chain->add(OptimizePodcast::class);
$chain->add(ReleasePodcast::class, $argA, $argB);

$chain->dispatch();

Why?

This allows us to add jobs to the chain without prior knowledge about which job would be the first. This may come in handy when jobs must be chained, but they are added dynamically to the chain.

Issue

Please open a new issue, if you are experiencing any troubles.

You might also like...
A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.
A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.

This package provides a Laravel Wrapper for the CoinDCX API and allows you to easily communicate with it. Important Note This package is in early deve

Laravel blade directives and php helpers for serverside rendered content, based on browser window size WITHOUT css

Laravel Window Size and Breakpoints Laravel blade directives and php helpers for server side rendered content, based on browser window size WITHOUT cs

A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache.

Laravel OTP Introduction A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache. The ca

Use Blade templates without the full Laravel framework

blade Use Laravel Blade templates as a standalone component without the full Laravel framework Full documentation is available at http://duncan3dc.git

Laravel blade directives and php helpers for serverside rendered content, based on browser window size WITHOUT css. Requires Livewire and AlpineJS.

Laravel Livewire Window Size and Breakpoints Laravel blade directives and php helpers for server side rendered content, based on browser window size W

In-place pagination without page refresh by using Backbone.js with Laravel PHP framework
In-place pagination without page refresh by using Backbone.js with Laravel PHP framework

Laravel Backbone - based in-place pagination demo Store application See demo at: http://demos.maxoffsky.com/ajax-pagination/ Tutorial at: http://maxof

Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling

Introduction Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling. Inspiration This package was inspired by t

LaravelFly is a safe solution to speeds up new or old Laravel 5.5+ projects, with preloading and coroutine, while without data pollution or memory leak

Would you like php 7.4 Preloading? Would you like php coroutine? Today you can use them with Laravel because of Swoole. With LaravalFly, Laravel will

Generate robust laravel athorization without writing a single line of code.

Implement robust laravel authorization logic without writing a single line of code This package helps you to quickly create strong policy authorizatio

Comments
  • Bump symfony/http-foundation from 4.3.4 to 4.4.11

    Bump symfony/http-foundation from 4.3.4 to 4.4.11

    Bumps symfony/http-foundation from 4.3.4 to 4.4.11.

    Release notes

    Sourced from symfony/http-foundation's releases.

    v4.4.11

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.10...v4.4.11)

    • bug #37291 Duplicated MimeType due to PHP Bug (juanmrad)
    • bug #37389 Change file extension of "audio/mpeg" from "mpga" to "mp3" (YaFou)

    v4.4.10

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.9...v4.4.10)

    • no changes

    v4.4.9

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.8...v4.4.9)

    • no changes

    v4.4.8

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.7...v4.4.8)

    • bug #36490 workaround PHP bug in the session module (nicolas-grekas)
    • bug #35656 Fixed session migration with custom cookie lifetime (Guite)

    v4.4.7

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.6...v4.4.7)

    • no changes

    v4.4.6

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.5...v4.4.6)

    • bug #36173 Fix clear cookie samesite (guillbdx)
    • bug #36103 fix preloading script generation (nicolas-grekas)

    v4.4.5

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.4...v4.4.5)

    • bug #35709 fix not sending Content-Type header for 204 responses (Tobion)
    • bug #35583 Add missing use statements (fabpot)

    v4.4.4

    Changelog (https://github.com/symfony/http-foundation/compare/v4.4.3...v4.4.4)

    • bug #35305  Fix stale-if-error behavior, add tests (mpdude)

    v4.3.11

    Changelog (https://github.com/symfony/http-foundation/compare/v4.3.10...v4.3.11)

    • bug #35305  Fix stale-if-error behavior, add tests (mpdude)
    Changelog

    Sourced from symfony/http-foundation's changelog.

    CHANGELOG

    5.2.0

    • added HeaderUtils::parseQuery(): it does the same as parse_str() but preserves dots in variable names
    • added File::getContent()

    5.1.0

    • added Cookie::withValue, Cookie::withDomain, Cookie::withExpires, Cookie::withPath, Cookie::withSecure, Cookie::withHttpOnly, Cookie::withRaw, Cookie::withSameSite
    • Deprecate Response::create(), JsonResponse::create(), RedirectResponse::create(), and StreamedResponse::create() methods (use __construct() instead)
    • added Request::preferSafeContent() and Response::setContentSafe() to handle "safe" HTTP preference according to RFC 8674
    • made the Mime component an optional dependency
    • added MarshallingSessionHandler, IdentityMarshaller
    • made Session accept a callback to report when the session is being used
    • Add support for all core cache control directives
    • Added Symfony\Component\HttpFoundation\InputBag
    • Deprecated retrieving non-string values using InputBag::get(), use InputBag::all() if you need access to the collection of values

    5.0.0

    • made Cookie auto-secure and lax by default
    • removed classes in the MimeType namespace, use the Symfony Mime component instead
    • removed method UploadedFile::getClientSize() and the related constructor argument
    • made Request::getSession() throw if the session has not been set before
    • removed Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL
    • passing a null url when instantiating a RedirectResponse is not allowed

    4.4.0

    • passing arguments to Request::isMethodSafe() is deprecated.
    • ApacheRequest is deprecated, use the Request class instead.
    • passing a third argument to HeaderBag::get() is deprecated, use method all() instead
    • [BC BREAK] PdoSessionHandler with MySQL changed the type of the lifetime column, make sure to run ALTER TABLE sessions MODIFY sess_lifetime INTEGER UNSIGNED NOT NULL to update your database.
    • PdoSessionHandler now precalculates the expiry timestamp in the lifetime column, make sure to run CREATE INDEX EXPIRY ON sessions (sess_lifetime) to update your database to speed up garbage collection of expired sessions.
    • added SessionHandlerFactory to create session handlers with a DSN
    Commits
    • 3675676 Merge branch '3.4' into 4.4
    • 5219dba Fix PHPUnit 8.5 deprecations.
    • 44f5147 Merge branch '3.4' into 4.4
    • b11fb1a [SCA] Minor fixes on tests
    • 3f65b22 Removed comments and requirements relative to php <5.5 (not supported anymore)
    • 768f66a Merge branch '3.4' into 4.4
    • b454f04 Fix test that fails on old distros
    • fb26f70 Merge branch '3.4' into 4.4
    • b78af31 bug #37291 [MimeType] Duplicated MimeType due to PHP Bug (juanmrad)
    • cd70a52 [MimeType] Duplicated MimeType due to PHP Bug
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump symfony/mime from 4.3.4 to 4.4.11

    Bump symfony/mime from 4.3.4 to 4.4.11

    Bumps symfony/mime from 4.3.4 to 4.4.11.

    Release notes

    Sourced from symfony/mime's releases.

    v4.4.11

    Changelog (https://github.com/symfony/mime/compare/v4.4.10...v4.4.11)

    • bug #37583 Fix EmailHeaderSame to make use of decoded value (evertharmeling)
    • bug #37581 Fix compat with HTTP requests (fabpot)
    • bug #36304 Check whether path is file in DataPart::fromPath() (freiondrej)

    v4.4.10

    Changelog (https://github.com/symfony/mime/compare/v4.4.9...v4.4.10)

    • bug #37167 use fromString when creating a new Address (fabpot)

    v4.4.9

    Changelog (https://github.com/symfony/mime/compare/v4.4.8...v4.4.9)

    • bug #36947 Allow email message to have "To", "Cc", or "Bcc" header to be valid (Ernest Hymel)
    • bug #36716 handle passing custom mime types as string (mcneely)
    • bug #36751 fix bad method call on EmailAddressContains (Kocal)

    v4.4.8

    Changelog (https://github.com/symfony/mime/compare/v4.4.7...v4.4.8)

    • bug #36467 Mailer from sender fixes (fabpot)

    v4.4.7

    Changelog (https://github.com/symfony/mime/compare/v4.4.6...v4.4.7)

    • no changes

    v4.4.6

    Changelog (https://github.com/symfony/mime/compare/v4.4.5...v4.4.6)

    • bug #36026 Fix boundary header (guillbdx)

    v4.4.5

    Changelog (https://github.com/symfony/mime/compare/v4.4.4...v4.4.5)

    • bug #35583 Add missing use statements (fabpot)

    v4.4.4

    Changelog (https://github.com/symfony/mime/compare/v4.4.3...v4.4.4)

    • no changes

    v4.3.11

    Changelog (https://github.com/symfony/mime/compare/v4.3.10...v4.3.11)

    • no changes
    Changelog

    Sourced from symfony/mime's changelog.

    CHANGELOG

    5.2.0

    • Add support for DKIM
    • Deprecated Address::fromString(), use Address::create() instead

    4.4.0

    • [BC BREAK] Removed NamedAddress (Address now supports a name)
    • Added PHPUnit constraints
    • Added AbstractPart::asDebugString()
    • Added Address::fromString()

    4.3.3

    • [BC BREAK] Renamed method Headers::getAll() to Headers::all().

    4.3.0

    • Introduced the component as experimental
    Commits
    • cb00d72 Fix EmailHeaderSame to make use of decoded value
    • 0c7b39f [Mime] Fix compat with HTTP requests
    • 57f926e Update MimeTypes.php
    • a8523e6 skip test if guesser is not supported
    • 715bfc6 Merge branch '3.4' into 4.4
    • c0a9737 Fix merge
    • 895a9d0 Check whether path is file in DataPart::fromPath()
    • af8e69e [Mime] use fromString when creating a new Adress
    • 555def0 [Mime] Remove unused var
    • 2adc530 Allow email message to have "To", "Cc", or "Bcc" header to be valid
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • How i can call onQueue() on chainer job?

    How i can call onQueue() on chainer job?

    I want to specify queues. How can I do so:

    OneJob::withChain([
        (new TwoJob())->onQueue('not_default_queue'),
        (new ThreeJob())->onQueue('not_default_queue'),
    ])->dispatch()->onQueue('not_default_queue');
    
    opened by i3bepb 0
Releases(v2.0.0)
Owner
Just Iversen
I/S Just Iversen open source repositories.
Just Iversen
Job Portal - Find your dream job here Various career opportunities await you

Find your dream job here Various career opportunities await you. Find the right career and connect with companies anytime, anywhere ?? free access to search for jobs, post resumes, and research companies. ??

Ossama Mehmood 샘 5 Nov 14, 2022
Dispatch Laravel jobs via Artisan

This package can register jobs as Artisan commands. All you need to do is let your job implement the empty ArtisanDispatchable interface.

Spatie 135 Nov 7, 2022
Add variables to the payload of all jobs in a Laravel app

Inject extra info to the payloads of all jobs in a Laravel app This package makes it easy to inject things in every job. Imagine that you want to have

Spatie 62 Dec 9, 2022
This package allows you to easily track your laravel jobs!

Trackable Jobs For Laravel This package allows you to track your laravel jobs! Using this package, you can easily persist the output and the status of

Mateus Junges 220 Dec 25, 2022
A Laravel package to monitor the status and history of jobs on the queue.

Monitored Jobs for Laravel Overview This package tracks the status and history of your queued jobs by hooking into the events that Laravel fires for i

Aryeo 9 Dec 9, 2022
This project is based on the aggregation of jobs from some technology companies.

FIND-JOBS-ALERT ?? ?? ?? This project is based on the aggregation of jobs from some technology companies. Check below, some companies avaliable in pro

Wellisson Ribeiro 2 Dec 1, 2021
A site which you can apply jobs or search for employees with cool functionalities..

About App An App which you can apply jobs or search for employees with cool functionalities. Some Pics of App Click Image to Zoom in Sign In & Up Empl

Fatih Canbolat 1 Jan 7, 2022
Job Engelen INF2B 669915 Webdevelopment eindopdracht.

Docker template for PHP projects This repository provides a starting template for PHP application development. It contains: NGINX webserver PHP FastCG

null 0 Jan 9, 2022
Clean up and prevent empty meta from being saved for Job, Company, or Resume listings in database

=== Empty Meta Cleanup for WP Job Manager === Contributors: tripflex Tags: wp job manager, meta, cleanup, wpjobmanager Requires at least: 5.2 Tested u

Myles McNamara 3 Feb 7, 2022
Laravel router extension to easily use Laravel's paginator without the query string

?? THIS PACKAGE HAS BEEN ABANDONED ?? We don't use this package anymore in our own projects and cannot justify the time needed to maintain it anymore.

Spatie 307 Sep 23, 2022