@@ 109-125 (lines=17) @@ | ||
106 | * |
|
107 | * @return string |
|
108 | */ |
|
109 | public function ResqueStatus() { |
|
110 | $status = new Resque_Job_Status($this->ResqueToken); |
|
111 | $statusCode = $status->get(); |
|
112 | // The Resque job can no longer be found, fallback to the DNDeployment.Status |
|
113 | if($statusCode === false) { |
|
114 | // Translate from the DNDeployment.Status to the Resque job status for UI purposes |
|
115 | switch($this->Status) { |
|
116 | case 'Finished': |
|
117 | return 'Complete'; |
|
118 | case 'Started': |
|
119 | return 'Running'; |
|
120 | default: |
|
121 | return $this->Status; |
|
122 | } |
|
123 | } |
|
124 | return self::map_resque_status($statusCode); |
|
125 | } |
|
126 | ||
127 | /** |
|
128 | * Start a resque job for this creation. |
@@ 289-305 (lines=17) @@ | ||
286 | * |
|
287 | * @return string |
|
288 | */ |
|
289 | public function ResqueStatus() { |
|
290 | $status = new Resque_Job_Status($this->ResqueToken); |
|
291 | $statusCode = $status->get(); |
|
292 | // The Resque job can no longer be found, fallback to the DNDataTransfer.Status |
|
293 | if($statusCode === false) { |
|
294 | // Translate from the DNDataTransfer.Status to the Resque job status for UI purposes |
|
295 | switch($this->Status) { |
|
296 | case 'Finished': |
|
297 | return 'Complete'; |
|
298 | case 'Started': |
|
299 | return 'Running'; |
|
300 | default: |
|
301 | return $this->Status; |
|
302 | } |
|
303 | } |
|
304 | return self::map_resque_status($statusCode); |
|
305 | } |
|
306 | ||
307 | } |
|
308 |