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: 137
Type:cakephp-plugin
Requires
- php: >=5.5
- cakephp/cakephp: ^3.2
- lewestopher/cakephp-monga: ^0.5.0
Requires (Dev)
- cakephp/migrations: ^1.0
- dereuromark/cakephp-tools: ^1.2
- fig-r/psr2r-sniffer: dev-master
Suggests
- dereuromark/cakephp-tools: For the Email lib and QueueEmailTask. Or write your own task here. Also for admin backend.
Conflicts
- dereuromark/cakephp-queue: dev-master
README
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