Permalink
Browse files

Change all require statements to include the full path.

  • Loading branch information...
Chris Boulton
Chris Boulton committed Apr 20, 2010
1 parent 6e6d7ad commit 9ce7cfb370a23e9ffd9e5b2b86a0ca95abab2b06
Showing with 12 additions and 12 deletions.
  1. +1 −1 README.markdown
  2. +4 −4 lib/Resque.php
  3. +2 −2 lib/Resque/Failure.php
  4. +2 −2 lib/Resque/Job.php
  5. +3 −3 lib/Resque/Worker.php
View
@@ -42,7 +42,7 @@ pre and post jobs
Jobs are queued as follows:
- require_once 'Resque.php';
+ require_once 'lib/Resque.php';
// Required if redis is located elsewhere
Resque::setBackend('localhost', 6379);
View
@@ -1,5 +1,5 @@
<?php
-require_once 'Resque/Exception.php';
+require_once dirname(__FILE__) . '/Resque/Exception.php';
/**
* Base Resque class.
@@ -28,7 +28,7 @@ public static function setBackend($server)
{
list($host, $port) = explode(':', $server);
- require_once 'Resque/Redis.php';
+ require_once dirname(__FILE__) . '/Resque/Redis.php';
self::$redis = new Resque_Redis($host, $port);
}
@@ -96,7 +96,7 @@ public static function size($queue)
*/
public static function enqueue($queue, $class, $args = null, $trackStatus = false)
{
- require_once 'Resque/Job.php';
+ require_once dirname(__FILE__) . '/Resque/Job.php';
return Resque_Job::create($queue, $class, $args, $trackStatus);
}
@@ -108,7 +108,7 @@ public static function enqueue($queue, $class, $args = null, $trackStatus = fals
*/
public static function reserve($queue)
{
- require_once 'Resque/Job.php';
+ require_once dirname(__FILE__) . '/Resque/Job.php';
return Resque_Job::reserve($queue);
}
View
@@ -1,5 +1,5 @@
<?php
-require_once 'Failure/Interface.php';
+require_once dirname(__FILE__) . '/Failure/Interface.php';
/**
* Failed Resque job.
@@ -38,7 +38,7 @@ public static function create($payload, Exception $exception, Resque_Worker $wor
public function getBackend()
{
if(self::$backend === null) {
- require 'Failure/Redis.php';
+ require dirname(__FILE__) . '/Failure/Redis.php';
self::$backend = 'Resque_Failure_Redis';
}
View
@@ -1,5 +1,5 @@
<?php
-require_once 'Job/Status.php';
+require_once dirname(__FILE__) . '/Job/Status.php';
/**
* Resque job.
@@ -147,7 +147,7 @@ public function perform()
public function fail($exception)
{
$this->updateStatus(Resque_Job_Status::STATUS_FAILED);
- require_once 'Failure.php';
+ require_once dirname(__FILE__) . '/Failure.php';
Resque_Failure::create(
$this->payload,
$exception,
View
@@ -1,7 +1,7 @@
<?php
-require_once 'Stat.php';
-require_once 'Job.php';
-require_once 'Job/DirtyExitException.php';
+require_once dirname(__FILE__) . '/Stat.php';
+require_once dirname(__FILE__) . '/Job.php';
+require_once dirname(__FILE__) . '/Job/DirtyExitException.php';
/**
* Resque worker that handles checking queues for jobs, fetching them

0 comments on commit 9ce7cfb

Please sign in to comment.