code/model/jobs/DNCreateEnvironment.php 1 location
|
@@ 41-50 (lines=10) @@
|
| 38 |
|
* @param int $int |
| 39 |
|
* @return string |
| 40 |
|
*/ |
| 41 |
|
public static function map_resque_status($int) { |
| 42 |
|
$remap = array( |
| 43 |
|
Resque_Job_Status::STATUS_WAITING => "Queued", |
| 44 |
|
Resque_Job_Status::STATUS_RUNNING => "Running", |
| 45 |
|
Resque_Job_Status::STATUS_FAILED => "Failed", |
| 46 |
|
Resque_Job_Status::STATUS_COMPLETE => "Complete", |
| 47 |
|
false => "Invalid", |
| 48 |
|
); |
| 49 |
|
return $remap[$int]; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
/** |
| 53 |
|
* @return string |
code/model/jobs/DNGitFetch.php 1 location
|
@@ 38-47 (lines=10) @@
|
| 35 |
|
* @param int $int |
| 36 |
|
* @return string |
| 37 |
|
*/ |
| 38 |
|
public static function map_resque_status($int) { |
| 39 |
|
$remap = array( |
| 40 |
|
Resque_Job_Status::STATUS_WAITING => "Queued", |
| 41 |
|
Resque_Job_Status::STATUS_RUNNING => "Running", |
| 42 |
|
Resque_Job_Status::STATUS_FAILED => "Failed", |
| 43 |
|
Resque_Job_Status::STATUS_COMPLETE => "Complete", |
| 44 |
|
false => "Invalid", |
| 45 |
|
); |
| 46 |
|
return $remap[$int]; |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
/** |
| 50 |
|
* Queue a fetch job |
code/model/jobs/DNPing.php 1 location
|
@@ 80-92 (lines=13) @@
|
| 77 |
|
/** |
| 78 |
|
* @return string |
| 79 |
|
*/ |
| 80 |
|
public function ResqueStatus() { |
| 81 |
|
$status = new Resque_Job_Status($this->ResqueToken); |
| 82 |
|
|
| 83 |
|
$remap = array( |
| 84 |
|
Resque_Job_Status::STATUS_WAITING => "Queued", |
| 85 |
|
Resque_Job_Status::STATUS_RUNNING => "Running", |
| 86 |
|
Resque_Job_Status::STATUS_FAILED => "Failed", |
| 87 |
|
Resque_Job_Status::STATUS_COMPLETE => "Complete", |
| 88 |
|
false => "Invalid", |
| 89 |
|
); |
| 90 |
|
|
| 91 |
|
return $remap[$status->get()]; |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
/** |
| 95 |
|
* Queue a ping job |
code/model/jobs/DNDataTransfer.php 1 location
|
@@ 90-99 (lines=10) @@
|
| 87 |
|
* @param int $int |
| 88 |
|
* @return string |
| 89 |
|
*/ |
| 90 |
|
public static function map_resque_status($int) { |
| 91 |
|
$remap = array( |
| 92 |
|
Resque_Job_Status::STATUS_WAITING => "Queued", |
| 93 |
|
Resque_Job_Status::STATUS_RUNNING => "Running", |
| 94 |
|
Resque_Job_Status::STATUS_FAILED => "Failed", |
| 95 |
|
Resque_Job_Status::STATUS_COMPLETE => "Complete", |
| 96 |
|
false => "Invalid", |
| 97 |
|
); |
| 98 |
|
return $remap[$int]; |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
public function getTitle() { |
| 102 |
|
return $this->dbObject('Created')->Nice() . " (Status: {$this->Status})"; |