From 2c5e0881981086b4122e219e9419de85c54f9f9f Mon Sep 17 00:00:00 2001 From: Chris Boulton Date: Thu, 1 Mar 2012 16:33:26 +1100 Subject: [PATCH] move include for resque before APP_INCLUDE is loaded in, so that way resque is available for the app --- resque.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resque.php b/resque.php index d85a70e..02ecc1a 100644 --- a/resque.php +++ b/resque.php @@ -4,15 +4,6 @@ if(empty($QUEUE)) { die("Set QUEUE env var containing the list of queues to work.\n"); } -$APP_INCLUDE = getenv('APP_INCLUDE'); -if($APP_INCLUDE) { - if(!file_exists($APP_INCLUDE)) { - die('APP_INCLUDE ('.$APP_INCLUDE.") does not exist.\n"); - } - - require_once $APP_INCLUDE; -} - require_once 'lib/Resque.php'; require_once 'lib/Resque/Worker.php'; @@ -32,6 +23,15 @@ else if(!empty($VVERBOSE)) { $logLevel = Resque_Worker::LOG_VERBOSE; } +$APP_INCLUDE = getenv('APP_INCLUDE'); +if($APP_INCLUDE) { + if(!file_exists($APP_INCLUDE)) { + die('APP_INCLUDE ('.$APP_INCLUDE.") does not exist.\n"); + } + + require_once $APP_INCLUDE; +} + $interval = 5; $INTERVAL = getenv('INTERVAL'); if(!empty($INTERVAL)) {