DNCreateEnvironment::ResqueStatus PHP Method

ResqueStatus() public method

Returns the status of the resque job
public ResqueStatus ( ) : string
return string
    public function ResqueStatus()
    {
        $status = new Resque_Job_Status($this->ResqueToken);
        $statusCode = $status->get();
        // The Resque job can no longer be found, fallback to the DNDeployment.Status
        if ($statusCode === false) {
            // Translate from the DNDeployment.Status to the Resque job status for UI purposes
            switch ($this->Status) {
                case 'Finished':
                    return 'Complete';
                case 'Started':
                    return 'Running';
                default:
                    return $this->Status;
            }
        }
        return self::map_resque_status($statusCode);
    }