The Queue plugin for CakePHP provides deferred task execution. This is a MongoDB implementation.
This branch is for use with CakePHP 3.
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.
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.
- 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.
- 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
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