diff --git a/EVENTS.txt b/EVENTS.txt index 95763bb56e..fd75036894 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -233,6 +233,10 @@ StartEndHTML: just before the tag EndEndHTML: just after the tag - $action: action object being shown +FinalAction: After prepare() (and possible handle) in Action class. +- $status: result of "prepare" call on action +- $action: Action that is currently running + StartShowDesign: just before showing a site, user, or group design - $action: action object being shown diff --git a/lib/action.php b/lib/action.php index ddfc5a505a..6d21c36e37 100644 --- a/lib/action.php +++ b/lib/action.php @@ -117,9 +117,16 @@ class Action extends HTMLOutputter // lawsuit common_config_set('db', 'database', $mirror); } - if ($this->prepare($args)) { + $status = $this->prepare($args); + if ($status) { $this->handle($args); + } else { + common_debug('Prepare failed for Action.'); } + + $this->flush(); + + Event::handle('EndActionExecute', array($status, $this)); } /** diff --git a/lib/default.php b/lib/default.php index dcdd58478c..5ce0f45061 100644 --- a/lib/default.php +++ b/lib/default.php @@ -294,6 +294,7 @@ $default = 'plugins' => array('core' => array( 'AuthCrypt' => array(), + 'Cron' => array(), 'LRDD' => array(), 'StrictTransportSecurity' => array(), ), diff --git a/lib/queuemanager.php b/lib/queuemanager.php index 0e37ab0c53..c8409df2e4 100644 --- a/lib/queuemanager.php +++ b/lib/queuemanager.php @@ -67,6 +67,9 @@ abstract class QueueManager extends IoManager self::$qm = new UnQueueManager(); } else { switch ($type) { + case 'cron': + self::$qm = new CronQueueManager(); + break; case 'db': self::$qm = new DBQueueManager(); break; diff --git a/scripts/getvaliddaemons.php b/scripts/getvaliddaemons.php index 78cbba8c07..b4e1e57e43 100755 --- a/scripts/getvaliddaemons.php +++ b/scripts/getvaliddaemons.php @@ -37,7 +37,7 @@ require_once INSTALLDIR.'/scripts/commandline.inc'; $daemons = array(); -$daemons[] = INSTALLDIR.'/scripts/queuedaemon.php'; +#$daemons[] = INSTALLDIR.'/scripts/queuedaemon.php'; if (Event::handle('GetValidDaemons', array(&$daemons))) { foreach ($daemons as $daemon) {