diff --git a/README.md b/README.md index 5db2a1b..e159724 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ phpunit --bootstrap craft/app/tests/bootstrap.php --configuration craft/plugins/ Changelog ================= +###0.4.2### + - Fixed bug with reading default config values + ###0.4.1### - Added the ability to control the watch interval via the `taskInterval` config setting diff --git a/TaskManagerPlugin.php b/TaskManagerPlugin.php index 6a463e1..fc86446 100644 --- a/TaskManagerPlugin.php +++ b/TaskManagerPlugin.php @@ -40,7 +40,7 @@ public function getDescription() */ public function getVersion() { - return '0.4.1'; + return '0.4.2'; } /** diff --git a/consolecommands/TaskManagerCommand.php b/consolecommands/TaskManagerCommand.php index d5e3229..beefef0 100644 --- a/consolecommands/TaskManagerCommand.php +++ b/consolecommands/TaskManagerCommand.php @@ -45,7 +45,7 @@ public function actionWatch() craft()->tasks->runPendingTasks(); // Sleep a little - sleep(craft()->config->get('taskInterval')); + sleep(craft()->config->get('taskInterval', 'taskManager')); } } diff --git a/controllers/TaskManagerController.php b/controllers/TaskManagerController.php index 5056eb9..62868e3 100644 --- a/controllers/TaskManagerController.php +++ b/controllers/TaskManagerController.php @@ -32,7 +32,7 @@ public function actionRerunAllFailedTasks() ->where(array('and', 'lft = 1', 'status = :status'), array(':status' => TaskStatus::Error)); // Get all hanging? tasks - if ($timeout = craft()->config->get('taskTimeout')) { + if ($timeout = craft()->config->get('taskTimeout', 'taskManager')) { $query->orWhere(array('and', 'lft = 1', 'dateCreated < (NOW() - INTERVAL :seconds SECOND)'), array(':seconds' => $timeout)); }