-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
564 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,12 @@ | |
require __DIR__ . '/init.php'; | ||
|
||
date_default_timezone_set('GMT'); | ||
Resque::setBackend('127.0.0.1:6379'); | ||
\Resque\Resque::setBackend('127.0.0.1:6379'); | ||
// You can also use a DSN-style format: | ||
//Resque::setBackend('redis://user:[email protected]:6379'); | ||
//Resque::setBackend('redis://user:[email protected]:3432/2'); | ||
//\Resque\Resque::setBackend('redis://user:[email protected]:6379'); | ||
//\Resque\Resque::setBackend('redis://user:[email protected]:3432/2'); | ||
|
||
$status = new Resque_Job_Status($argv[1]); | ||
$status = new \Resque\Job\Status($argv[1]); | ||
if(!$status->isTracking()) { | ||
die("Resque is not tracking the status of this job.\n"); | ||
} | ||
|
@@ -20,4 +20,4 @@ | |
while(true) { | ||
fwrite(STDOUT, "Status of ".$argv[1]." is: ".$status->get()."\n"); | ||
sleep(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
require __DIR__ . '/init.php'; | ||
date_default_timezone_set('GMT'); | ||
Resque::setBackend('127.0.0.1:6379'); | ||
\Resque\Resque::setBackend('127.0.0.1:6379'); | ||
|
||
// You can also use a DSN-style format: | ||
//Resque::setBackend('redis://user:[email protected]:6379'); | ||
|
@@ -18,9 +18,9 @@ | |
), | ||
); | ||
if (empty($argv[2])) { | ||
$jobId = Resque::enqueue('default', $argv[1], $args, true); | ||
$jobId = \Resque\Resque::enqueue('default', $argv[1], $args, true); | ||
} else { | ||
$jobId = Resque::enqueue($argv[1], $argv[2], $args, true); | ||
$jobId = \Resque\Resque::enqueue($argv[1], $argv[2], $args, true); | ||
} | ||
|
||
echo "Queued job ".$jobId."\n\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
lib/Resque/Job/DirtyExitException.php → lib/Exceptions/DirtyExitException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<?php | ||
|
||
namespace Resque\Exceptions; | ||
|
||
use \RuntimeException; | ||
|
||
/** | ||
* Runtime exception class for a job that does not exit cleanly. | ||
* | ||
* @package Resque/Job | ||
* @author Chris Boulton <chris@bigcommerce.com> | ||
* @license http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
class Resque_Job_DirtyExitException extends RuntimeException | ||
class DirtyExitException extends RuntimeException | ||
{ | ||
} |
6 changes: 5 additions & 1 deletion
6
lib/Resque/Job/DontCreate.php → lib/Exceptions/DoNotCreateException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<?php | ||
|
||
namespace Resque\Exceptions; | ||
|
||
use \Exception as CoreException; | ||
|
||
/** | ||
* Exception to be thrown if while enqueuing a job it should not be created. | ||
* | ||
* @package Resque/Job | ||
* @author Chris Boulton <chris@bigcommerce.com> | ||
* @license http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
class Resque_Job_DontCreate extends Exception | ||
class DoNotCreateException extends CoreException | ||
{ | ||
} |
6 changes: 5 additions & 1 deletion
6
lib/Resque/Job/DontPerform.php → lib/Exceptions/DoNotPerformException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<?php | ||
|
||
namespace Resque\Exceptions; | ||
|
||
use \Exception as CoreException; | ||
|
||
/** | ||
* Exception to be thrown if a job should not be performed/run. | ||
* | ||
* @package Resque/Job | ||
* @author Chris Boulton <chris@bigcommerce.com> | ||
* @license http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
class Resque_Job_DontPerform extends Exception | ||
class DoNotPerformException extends CoreException | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<?php | ||
|
||
namespace Resque\Exceptions; | ||
|
||
use \Exception as CoreException; | ||
|
||
/** | ||
* Resque exception. | ||
* | ||
* @package Resque | ||
* @author Chris Boulton <chris@bigcommerce.com> | ||
* @license http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
class Resque_Exception extends Exception | ||
class Exception extends CoreException | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Resque\Exceptions; | ||
|
||
/** | ||
* Exception thrown whenever an invalid timestamp has been passed to a job. | ||
* | ||
* @package ResqueScheduler | ||
* @author Chris Boulton <chris@bigcommerce.com> | ||
* @copyright (c) 2012 Chris Boulton | ||
* @license http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
class InvalidTimestampException extends Exception | ||
{ | ||
} |
4 changes: 3 additions & 1 deletion
4
lib/Resque/RedisException.php → lib/Exceptions/RedisException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<?php | ||
|
||
namespace Resque\Exceptions; | ||
|
||
/** | ||
* Redis related exceptions | ||
* | ||
* @package Resque | ||
* @author Chris Boulton <chris@bigcommerce.com> | ||
* @license http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
class Resque_RedisException extends Resque_Exception | ||
class RedisException extends Exception | ||
{ | ||
} |
6 changes: 4 additions & 2 deletions
6
lib/Resque/Failure/Interface.php → lib/Failure/FailureInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.