bbqueue/queue

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

dev-master 2016-08-06 11:31 UTC

This package is auto-updated.

Last update: 2021-09-04 23:11:30 UTC


README

WIP Queue abstraction library

Usefull links

https://registry.hub.docker.com/u/pataquets/gearmand/ https://registry.hub.docker.com/u/kdihalas/beanstalkd/ https://registry.hub.docker.com/u/platformer/resque-1-x-stable/

Thought examples

<?php

require 'vendor/autoload.php';

$queue = new Queue(new Backend\Iron());

$queue->prepare(new FetchAchievementsJob())->then(new JobCollectionJob([
    FetchDescriptionJob::class,
    FetchIconJob::class,
    FetchTitleJob::class,
]))->enqueue();

$queue->prepare(new FetchPackagesJob())->
    conditional(new MatchStringCondition('package.vendor', 'WyriHaximus'))->
        then(new JobCollectionJob([
             StorePackageJob::class,
             AnaliseDependenciesJob::class,
             UpdateProjectJob::class,
         ]))->
        else(StorePackageJob::class)->
    end()->
    enqueue();