2017 © Pedro Peláez
 

library queue-interop

Queue interop.

image

vanilla/queue-interop

Queue interop.

  • Wednesday, August 1, 2018
  • by kaecyra
  • Repository
  • 3 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Queue Interop

This package provides abstraction and interfaces necessary for both job payloads and job processors to interact together., (*1)

From a job payload perspective

All job payloads must implement the RunnableJobInterface. A job processor will then call the following methods in order:, (*2)

  • RunnableJobInterface::setup()
  • RunnableJobInterface::run()
  • RunnableJobInterface::teardown()

Beside this, all open source Vanilla jobs must extend the AbstractJob class so that jobs can be run directly on web server but also anywhere else by implementing a custom job processor., (*3)

Services

Services are made accessible to job payloads. But in order to access them, a job must implement the proper aware interface. By implementing the aware interface, a job processor will inject the corresponding service thru a setter method prior to running the payload., (*4)

Here's the list of services available:, (*5)

Database

A job can implement DatabaseAwareInterface to get injected with the Garden\Db\Db object., (*6)

Vanilla configs and locales context

A job can implement VanillaContextAwareInterface to get injected with the VanillaContextInterface interface. br/ With VanillaContextInterface, a job can access a ConfigInterface to manage both configs and locales in Vanilla., (*7)

Scheduler

A job can implement SchedulerAwareInterface to get injected with the SchedulerInterface. With SchedulerInterface, a job can also schedule other jobs from within its payload., (*8)

From a job runner perspective

A job processor is responsible to provide implementation for the following interfaces:, (*9)

  • JobBridgeInterface
  • JobContextInterface
  • SchedulerInterface
  • VanillaContextInterface
  • ConfigInterface

It is also responsible to inject services to jobs that implements the following interfaces:, (*10)

  • DatabaseAwareInterface
  • SchedulerAwareInterface
  • VanillaContextAwareInterface

The Versions

01/08 2018

dev-feature/job-shareable-interfaces

dev-feature/job-shareable-interfaces

Queue interop.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

23/01 2017

dev-master

9999999-dev

Queue interop.

  Sources   Download

MIT

The Requires

  • php >=7.0