DNCreateEnvironment::enqueueCreation PHP Method

enqueueCreation() protected method

Start a resque job for this creation.
protected enqueueCreation ( ) : string
return string Resque token
    protected function enqueueCreation()
    {
        $project = $this->Project();
        $log = $this->log();
        $args = array('createID' => $this->ID, 'logfile' => $this->logfile(), 'projectName' => $project->Name);
        if (!$this->CreatorID) {
            $this->CreatorID = Member::currentUserID();
        }
        if ($this->CreatorID) {
            $creator = $this->Creator();
            $message = sprintf('Environment creation for project %s initiated by %s (%s), with IP address %s', $project->Name, $creator->getName(), $creator->Email, Controller::curr()->getRequest()->getIP());
            $log->write($message);
        }
        return Resque::enqueue('create', 'CreateEnvJob', $args, true);
    }