2017 © Pedro Peláez
 

cakephp-plugin cakephp-queue

The Queue plugin for CakePHP provides deferred task execution, forked to support SQLite.

image

justinyost/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution, forked to support SQLite.

  • Tuesday, July 11, 2017
  • by jtyost2
  • Repository
  • 1 Watchers
  • 0 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 94 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

CakePHP Queue Plugin

This branch is for use with CakePHP 3 and SQLite. It is a fork only for use to support SQLite, the real version of this package should be used at: https://github.com/dereuromark/cakephp-queue., (*1)

Background

This is a very simple and minimalistic job queue (or deferred-task) system for CakePHP. It is mainly for demo purposes on how queues work and doesn't have any dependencies., (*2)

Overall functionality is inspired by systems like Gearman, Beanstalk or dropr, but without any illusion to compete with these more advanced Systems., (*3)

The plugin is an attempt to provide a basic, simple to use method to enable deferred job execution, without the hassle of setting up or running an extra queue daemon, while integrating nicely into CakePHP and also simplifying the creation of worker scripts., (*4)

Please also read the blog post. For more robust and production use cases please see the awesome list., (*5)

Why use deferred execution?

Deferred execution makes sense (especially in PHP) when your page wants to execute tasks, which are not directly related to rendering the current page. For instance, in a BBS-type system, a new users post might require the creation of multiple personalized email messages, notifying other users of the new content. Creating and sending these emails is completely irrelevant to the currently active user, and should not increase page response time. Another example would be downloading, extraction and/or analyzing an external file per request of the user. The regular solution to these problems would be to create specialized cronjobs which use specific database states to determine which action should be done., (*6)

The Queue plugin provides a simple method to create and run such non-user-interaction-critical tasks., (*7)

While you can run multiple workers, and can (to some extent) spread these workers to different machines via a shared database, you should seriously consider using a more advanced system for high volume/high number of workers systems., (*8)

Installation and Usage

See Documentation., (*9)

Limitation

If you want to use multiple workers, please use only one per type. Currently it would otherwise risk the jobs being run multiple times!, (*10)

History

Recent Improvements

  • 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!, (*11)

Modified by David Yell (davidyell) - Basic CakePHP 3.x support, (*12)

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'][...]), (*13)

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

The Versions

11/07 2017

dev-master

9999999-dev http://github.com/justinyost/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution, forked to support SQLite.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

11/07 2017

3.4.2

3.4.2.0 http://github.com/justinyost/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution, forked to support SQLite.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

27/06 2017

3.4.1

3.4.1.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

20/05 2017

2.x-dev

2.9999999.9999999.9999999-dev http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

cakephp queue background deferred tasks

15/04 2017

3.4.0

3.4.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

23/08 2016

3.3.2

3.3.2.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

24/06 2016

3.3.0

3.3.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

25/04 2016

3.2.1

3.2.1.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

19/03 2016

3.2.0

3.2.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

20/02 2016

3.1.0

3.1.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

10/01 2016

2.3.0

2.3.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

cakephp queue background deferred tasks

30/10 2015

3.0.0

3.0.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp queue background deferred tasks

31/03 2015

2.2.0

2.2.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

  Sources   Download

MIT

The Requires

 

cakephp queue background deferred tasks

02/03 2015

2.1.0

2.1.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides dereferred task execution.

  Sources   Download

MIT

The Requires

 

cakephp queue background dereferred tasks

12/12 2014

2.0.0

2.0.0.0 http://github.com/dereuromark/cakephp-queue

The Queue plugin for CakePHP provides dereferred task execution.

  Sources   Download

MIT

The Requires

 

cakephp queue background dereferred tasks