updated method comments

This commit is contained in:
Chaitanya Kuber 2012-03-01 19:21:06 -06:00
parent 8f06294048
commit ef859b6fc5

View File

@ -52,6 +52,8 @@ class Resque_Job
* @param string $class The name of the class that contains the code to execute the job. * @param string $class The name of the class that contains the code to execute the job.
* @param array $args Any optional arguments that should be passed when the job is executed. * @param array $args Any optional arguments that should be passed when the job is executed.
* @param boolean $monitor Set to true to be able to monitor the status of a job. * @param boolean $monitor Set to true to be able to monitor the status of a job.
*
* @return string
*/ */
public static function create($queue, $class, $args = null, $monitor = false) public static function create($queue, $class, $args = null, $monitor = false)
{ {
@ -154,7 +156,7 @@ class Resque_Job
); );
} }
$this->instance = new $this->payload['class']; $this->instance = new $this->payload['class']();
$this->instance->job = $this; $this->instance->job = $this;
$this->instance->args = $this->getArguments(); $this->instance->args = $this->getArguments();
return $this->instance; return $this->instance;
@ -164,6 +166,7 @@ class Resque_Job
* Actually execute a job by calling the perform method on the class * Actually execute a job by calling the perform method on the class
* associated with the job with the supplied arguments. * associated with the job with the supplied arguments.
* *
* @return bool
* @throws Resque_Exception When the job's class could not be found or it does not contain a perform method. * @throws Resque_Exception When the job's class could not be found or it does not contain a perform method.
*/ */
public function perform() public function perform()
@ -194,6 +197,8 @@ class Resque_Job
/** /**
* Mark the current job as having failed. * Mark the current job as having failed.
*
* @param $exception
*/ */
public function fail($exception) public function fail($exception)
{ {
@ -216,6 +221,7 @@ class Resque_Job
/** /**
* Re-queue the current job. * Re-queue the current job.
* @return string
*/ */
public function recreate() public function recreate()
{ {