rgoro/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution. This is a MongoDB implementation.

Installs: 84

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 131

Type:cakephp-plugin

3.3.3 2017-03-22 15:22 UTC

This package is not auto-updated.

Last update: 2022-11-26 10:09:07 UTC


README

Build Status Coverage Status Latest Stable Version Minimum PHP Version License Total Downloads Coding Standards

This branch is for use with CakePHP 3.

What this package is

First go read the original background and use cases on the readme for the original package

This is an implementation of Mark Scherer's simple Cake PHP queues replacing MySQL with MongoDB for the backend.

What this package is not

This is not a drop-in replacement for the original package. While I intend to work with that package's mantainer to integrate this backend, this is intended to satisfy a particular use case first and be of generic use later.

A major issue is that the main classes (QueuedJobsTable, QueueShell and QueueTask) were just copied to new MongoDB based implementations (QueuedJobsCollection, MongoQueueShell and MongoQueueTask). An integrated implementation should have these classes as subclasses of the originals (or a common base class) and a factory to select which implementation to use based on the configuration.

Installation and Usage

See Documentation.

To Do items:

  • The statistics that were implemented in the original package are yet to be ported to Mongo.
  • The backend controller has not been revised nor tested.
  • Make this implementation compatible with the MySQL implementation.

History

Recent Improvements

  • MongoDB Backend
  • QueuedJobs table instead of QueuedTasks (Tasks are the implementing classes only)
  • json_encode/decode instead of serialize
  • Priority for jobs
  • Transactions on getting a new job if supported from the database
  • Code improvements, stricter typehinting

And...

A huge thx to Max (Dee-Fuse) for making the 3.x upgrade complete!

Modified by David Yell (davidyell)

  • Basic CakePHP 3.x support

Modified by Mark Scherer (dereuromark)

  • CakePHP 2.x support
  • Some minor fixes
  • Added crontasks (as a different approach on specific problems)
  • Possible (optional) Tools Plugin dependencies for frontend access via /admin/queue
  • Config key "queue" is now "Queue" ($config['Queue'][...])

Added by Christian Charukiewicz (charukiewicz):

  • Configuration option 'gcprop' is now 'gcprob'
  • Fixed typo in README and variable name (Propability -> Probability)
  • Added a few lines about createJob() usage to README
  • Added comments to queue.php explaining configuration options