Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
05ba673
added an option in config for workers to print a timestamp each time …
charukiewicz May 8, 2015
62858f4
fixed indentation
charukiewicz May 8, 2015
7b9e2e2
Fix travis
May 8, 2015
44d66f7
fixed config indentation
charukiewicz May 8, 2015
5a8c59d
Merge branch 'master' of github.com:charukiewicz/cakephp-queue
May 8, 2015
65f4481
always show timestamp
May 8, 2015
263333e
travis
May 14, 2015
d19a892
badge
May 14, 2015
61ac1db
Use Flash component
Jul 31, 2015
f1b9d9c
remove cake_console domain
Jul 31, 2015
4fc72a1
travis
Aug 27, 2015
99b7356
fixed spelling mistake
Oct 31, 2015
d301cfe
Merge pull request #62 from mntbkr/patch-1
dereuromark Oct 31, 2015
19b303f
Remove recursive property calls.
Dec 14, 2015
dac8a04
Cleanup
Dec 26, 2015
1a3dfaf
Cleanup
Jan 10, 2016
b30bb9c
add priorty to queue tasks
Apr 7, 2016
eda9127
Added a try catch block to prevent a poorly written task from killing…
Apr 7, 2016
dae2570
adding SQS support for queue system
ResponsiChris Nov 6, 2020
d6d9719
adding some queue worker output to debug intercom sync jobs
ResponsiChris Nov 6, 2020
3bcac80
adding new retry logic for when the DB record isn't ready but SQS tri…
ResponsiChris Nov 6, 2020
4e74dcd
default delay of 2 seconds for SQS jobs to let the databse catch up
ResponsiChris Nov 6, 2020
d787a45
supporting delayed queue jobs
ResponsiChris Nov 11, 2020
327075c
adding some error logging and reschedule queued tasks logic
ResponsiChris Nov 12, 2020
3d653ef
Queue retry logic now correctly increments the retry counter
ResponsiChris Dec 10, 2020
b2d5202
reducing how many time we retry for db records not found to 1 retry a…
ResponsiChris Jan 4, 2021
48eff12
fix: add additional dupekey to prevent overriding queue
ronmrcdo May 7, 2025
86c460c
fix: revert changes on findAndReschedule
ronmrcdo May 7, 2025
ec4dba9
fix: spacing
ronmrcdo May 7, 2025
4ebedaf
Merge pull request #5 from Symphosize/fix/extra-dupekey
ronmrcdo May 7, 2025
9f26f71
fix: missing additional key on save single connection
ronmrcdo May 7, 2025
88f484e
Merge pull request #6 from Symphosize/fix/missing-dupe-key-save-single
ronmrcdo May 7, 2025
37ae0d1
feat: add workermaxmemorytimeout option
May 19, 2025
53b4456
Merge pull request #7 from Symphosize/feat/add-workermaxmemorytimeout…
xrompdev May 20, 2025
d6f96fb
feat: add ECS mode support and enhance job processing logic
xrompdev Nov 2, 2025
f3fbeb4
feat: enforce ecs flag for all company
xrompdev Nov 4, 2025
f56eb5c
feat: queue enrtypoint for reinit default
xrompdev Dec 1, 2025
9c53665
Merge pull request #9 from Symphosize/feat/ecs-queueu-connection
xrompdev Dec 1, 2025
e5ceb8e
Merge pull request #10 from Symphosize/feat/reinit-defauult-ecs
xrompdev Dec 1, 2025
9ff956c
feat: completely enable ecs in default
xrompdev Dec 13, 2025
0c043bd
feat: add worker max message process
xrompdev Feb 9, 2026
474f1a2
feat: add jitter to worker max runtime to prevent thundering herd
xrompdev Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 23 additions & 41 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,38 @@ php:
- 5.6

env:
- CAKE_VERSION=2.6
- CAKE_VERSION=2.7
global:
- REPO_NAME=cakephp-queue
- PLUGIN_NAME=Queue
- REQUIRE=""

matrix:
- DB=mysql CAKE_VERSION=2.7
- DB=mysql CAKE_VERSION=2.8

matrix:
include:
- php: 5.4
env:
- PHPCS=1

allow_failures:
- php: 5.4
env:
- PHPCS=1
- DB=mysql CAKE_VERSION=2.7 COVERALLS=1

before_script:
- sh -c "if [ '$PHPCS' != '1' ]; then git clone --depth 1 --branch $CAKE_VERSION git://github.com/cakephp/cakephp ../cakephp; else git clone --depth 1 --branch 2.6 git://github.com/cakephp/cakephp ../cakephp; fi" && cd ../cakephp
- rm -R app
- git clone --depth 1 --branch master git://github.com/dereuromark/tools-app app
- git clone --depth 1 --branch master git://github.com/dereuromark/cakephp-tools plugins/Tools
- git clone --depth 1 --branch master git://github.com/dereuromark/cakephp-shim plugins/Shim
- cp -R ../cakephp-queue plugins/Queue
- sh -c "mysql -e 'CREATE DATABASE cakephp_test;'"
- mkdir ./app/tmp
- mkdir ./app/tmp/logs
- mkdir ./app/tmp/queue
- mkdir ./app/tmp/tests
- mkdir ./app/tmp/cache
- mkdir ./app/tmp/cache/persistent
- mkdir ./app/tmp/cache/models
- chmod -R 0777 ./app/tmp
- sh -c "if [ '$PHPCS' = '1' ]; then pear channel-discover pear.cakephp.org; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then pear install --alldeps cakephp/CakePHP_CodeSniffer; fi"
- phpenv rehash
- echo "<?php
class DATABASE_CONFIG {
public \$test = array(
'datasource' => 'Database/Mysql',
'database' => 'cakephp_test',
'host' => '0.0.0.0',
'login' => 'travis',
'persistent' => false,
);
}" > app/Config/database.php
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then composer global require 'phpunit/phpunit=3.7.33'; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then ln -s ~/.composer/vendor/phpunit/phpunit/PHPUnit ./vendors/PHPUnit; fi"
- cd app
- git clone -b master https://github.com/FriendsOfCake/travis.git --depth 1 ../travis
- ../travis/before_script.sh
- cd ../cakephp/app
- composer require --dev --no-interaction --prefer-source dereuromark/cakephp-tools:0.*
- echo "<?php App::uses('MyModel', 'Tools.Model'); class AppModel extends MyModel {}" > Model/AppModel.php
- echo "<?php App::uses('MyController', 'Tools.Controller'); class AppController extends MyController {}" > Controller/AppController.php
- echo "<?php App::uses('BaseEmailConfig', 'Tools.Config'); class EmailConfig extends BaseEmailConfig {}" > Config/email.php
- echo "Configure::write('Security.salt', 'AycG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');" >> Config/bootstrap.php
- echo "Configure::write('Security.cipherSeed', '16659201697453542496749683615');" >> Config/bootstrap.php
- cd ..

script:
- sh -c "if [ '$PHPCS' != '1' ]; then ../lib/Cake/Console/cake test Queue AllQueue --stderr; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then cd ..; phpcs -p --extensions=php --standard=CakePHP ./plugins/Queue; fi"
- ../travis/script.sh

after_success:
- ../travis/after_success.sh

notifications:
email: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
class AddingPriorityFieldToQueueTasks extends CakeMigration {

/**
* Migration description
*
* @var string
*/
public $description = 'adding_priority_field_to_queue_tasks';

/**
* Actions to be performed
*
* @var array $migration
*/
public $migration = array(
'up' => array(
'create_field' => [
'queued_tasks' => [
'priority' => [
'type' => 'integer',
'null' => false,
'default' => 5,
'length' => 4
],
'indexes' => array(
'priority' => array('column' => 'priority'),
),
],
]
),
'down' => array(
'drop_field' => [
'queued_tasks' => [
'priority'
],
]
),
);

/**
* Before migration callback
*
* @param string $direction Direction of migration process (up or down)
* @return bool Should process continue
*/
public function before($direction) {
return true;
}

/**
* After migration callback
*
* @param string $direction Direction of migration process (up or down)
* @return bool Should process continue
*/
public function after($direction) {
return true;
}
}
2 changes: 1 addition & 1 deletion Config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
'log' => true,

// set to false to disable (tmp = file in TMP dir)
'notify' => 'tmp'
'notify' => 'tmp',
];
2 changes: 1 addition & 1 deletion Console/Command/CronShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function main() {
}

/**
* Look for a Queue Task of hte passed name and try to call add() on it.
* Look for a Queue Task of the passed name and try to call add() on it.
* A QueueTask may provide an add function to enable the user to create new jobs via commandline.
*
* @return void
Expand Down
Loading