Change all require statements to include the full path.

This commit is contained in:
Chris Boulton 2010-04-20 10:59:06 +10:00
parent 6e6d7ad859
commit 9ce7cfb370
5 changed files with 12 additions and 12 deletions

View File

@ -42,7 +42,7 @@ pre and post jobs
Jobs are queued as follows: Jobs are queued as follows:
require_once 'Resque.php'; require_once 'lib/Resque.php';
// Required if redis is located elsewhere // Required if redis is located elsewhere
Resque::setBackend('localhost', 6379); Resque::setBackend('localhost', 6379);

View File

@ -1,5 +1,5 @@
<?php <?php
require_once 'Resque/Exception.php'; require_once dirname(__FILE__) . '/Resque/Exception.php';
/** /**
* Base Resque class. * Base Resque class.
@ -28,7 +28,7 @@ class Resque
{ {
list($host, $port) = explode(':', $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); self::$redis = new Resque_Redis($host, $port);
} }
@ -96,7 +96,7 @@ class Resque
*/ */
public static function enqueue($queue, $class, $args = null, $trackStatus = false) 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); return Resque_Job::create($queue, $class, $args, $trackStatus);
} }
@ -108,7 +108,7 @@ class Resque
*/ */
public static function reserve($queue) public static function reserve($queue)
{ {
require_once 'Resque/Job.php'; require_once dirname(__FILE__) . '/Resque/Job.php';
return Resque_Job::reserve($queue); return Resque_Job::reserve($queue);
} }

View File

@ -1,5 +1,5 @@
<?php <?php
require_once 'Failure/Interface.php'; require_once dirname(__FILE__) . '/Failure/Interface.php';
/** /**
* Failed Resque job. * Failed Resque job.
@ -38,7 +38,7 @@ class Resque_Failure
public function getBackend() public function getBackend()
{ {
if(self::$backend === null) { if(self::$backend === null) {
require 'Failure/Redis.php'; require dirname(__FILE__) . '/Failure/Redis.php';
self::$backend = 'Resque_Failure_Redis'; self::$backend = 'Resque_Failure_Redis';
} }

View File

@ -1,5 +1,5 @@
<?php <?php
require_once 'Job/Status.php'; require_once dirname(__FILE__) . '/Job/Status.php';
/** /**
* Resque job. * Resque job.
@ -147,7 +147,7 @@ class Resque_Job
public function fail($exception) public function fail($exception)
{ {
$this->updateStatus(Resque_Job_Status::STATUS_FAILED); $this->updateStatus(Resque_Job_Status::STATUS_FAILED);
require_once 'Failure.php'; require_once dirname(__FILE__) . '/Failure.php';
Resque_Failure::create( Resque_Failure::create(
$this->payload, $this->payload,
$exception, $exception,

View File

@ -1,7 +1,7 @@
<?php <?php
require_once 'Stat.php'; require_once dirname(__FILE__) . '/Stat.php';
require_once 'Job.php'; require_once dirname(__FILE__) . '/Job.php';
require_once 'Job/DirtyExitException.php'; require_once dirname(__FILE__) . '/Job/DirtyExitException.php';
/** /**
* Resque worker that handles checking queues for jobs, fetching them * Resque worker that handles checking queues for jobs, fetching them