Starts the worker which processes all enqueued jobs. If it could not be started, the job data will be passed to the \Morrow\Input class.
@return	boolean	Returns `true` if the worker could have been started and `false` if not.
348709
public function process() {
		$job_id = $this->_input->get('_morrow_messagequeue_id');

		// just start worker if startworker was sent by $_GET
		if ($job_id !== null) {
			// pass data for the current job to the worker
			$job = $this->get($job_id);
			foreach ($job['data'] as $key => $value) {
				$this->_input->set($key, $value);
			}
			
			return false;
		}

		// get all files to process
		$files = glob($this->_save_path . '*.mq');

		// there is no entry to process anymore
		while (count($files) > 0) {
			sort($files);

			// extract data for the job to process
			$item = json_decode(file_get_contents($files[0]), true);

			$command = $this->_cli_path . ' ' . getcwd() . '/index.php' . ' ' . $item['controller'] . ' _morrow_messagequeue_id=' . $item['id'];
			exec($command, $output, $return_var);

			unlink($files[0]);
	
			// get all files to process
			$files = glob($this->_save_path . '*.mq');
		}

		unlink($this->_lockfile);

		return true;
	}
394505
public function canStart()
    {
        if ($this->state === self::STATE_NOT_STARTED) {
            return true;
        }

        if ($this->state === self::STATE_PAUSED) {
            return true;
        }

        return false;
    }
746383
public function start(): bool
    {
        if (!$this->started) {
            // check headers
            if (headers_sent($file, $line)) {
                throw new SessionException(sprintf("Cannot use '%s()', headers already sent in %s:%s",
                    __method__, $file, $line));
            }

            // start session
            $this->started = session_start();
            if (!$this->started) {
                session_write_close();
                throw new SessionException(sprintf("Session start failed in '%s()'", __method__));
            }

            // check id for last time
            if (session_id() !== $this->id) {
                session_write_close();
                throw new SessionException(sprintf("Session ID match failed in '%s()'", __method__));
            }

            // init sub-array
            if (!isset($_SESSION[$this->name])) {
                $_SESSION[$this->name] = [];
            }
        }

        return $this->started;
    }
1135632
public function start()
    {
        if (!$this->canStart()) {
            return false;
        }

        $this->startTime = microtime(true);

        return $this->setState(self::STATE_STARTED);
    }
743208
public function start()
    {
        $finished = [];
        $running = [];
        $active = 0;

        while (!empty($this->processes)) {
            while ($active < $this->batchSize && !empty($this->processes)) {
                $p = array_shift($this->processes);
                array_push($running, $p->runAsync());

                $active++;
            }

            foreach ($running as $index => $p) {
                if (!$p->isAlive()) {
                    $active--;
                    array_push($finished, $p);
                    unset($running[$index]);

                    if (!empty($this->processes)) {
                        array_push($running, array_shift($this->processes)->runAsync());
                        $active++;
                    }
                }
            }

            reset($running);
        }

        unset($this->processes);
        $this->processes = $finished;
        unset($finished, $running);
    }
287198
protected function startup()
    {
        $this->log(array('message' => 'Starting worker ' . $this, 'data' => array('type' => 'start', 'worker' => (string) $this)), self::LOG_TYPE_INFO);

        $this->registerSigHandlers();
        $this->pruneDeadWorkers();
        Resque_Event::trigger('beforeFirstFork', $this);
        $this->registerWorker();
    }
341652
public function start()
    {

        $state = $this->getState();

        if (in_array($state, [self::STATE_T_START, self::STATE_T_STOP, self::STATE_T_KILL])) {

            $processId = $this->getProcessId();

            if (!$this->processExists()) {

                $this->getLogger()
                    ->warning("Daemon is ill can't find process {$processId}, try clean data and continue starting",
                        [__NAMESPACE__]);
                $this->cleanData();

                // continue start

            } else {
                $this->getLogger()
                    ->info("Daemon can't START, cause state : {$state}, and process exists {$processId}",
                        [__NAMESPACE__]);

                return false;
            }
        }

        $this->setProcessId($pid = intval(getmypid()));
        $this->setData(self::P_CREATED_TIME, time());
        $this->setState(self::STATE_T_START);

        try {
            $this->mainLoop();
            $this->waitManagersDone();
        } catch (\Exception $ex) {
            $this->getLogger()->warning($ex->getMessage(), [__NAMESPACE__]);
        }

        $this->cleanData();

        return true;
    }
1013225
public function StartDeployment() {
		$this->Status = 'Started';
		if (!$this->Started) $this->Started = SS_Datetime::now()->Rfc2822();
		$this->log("Starting {$this->Title}...");
		$this->write();
		return true;
	}
260747
public function start()
    {
        declare (ticks = 1);
        pcntl_signal(SIGINT, SIG_IGN, true);
        
        if (!$pipes = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP)) {
            throw new \RuntimeException('Failed to create socket pair');
        }
        
        $pid = pcntl_fork();
        
        if ($pid > 0) {
            if (function_exists('setproctitle')) {
                setproctitle('boris (master)');
            }
            
            fclose($pipes[0]);
            $client = new ReadlineClient($pipes[1]);
            $client->start($this->_prompt, $this->_historyFile);
        } elseif ($pid < 0) {
            throw new \RuntimeException('Failed to fork child process');
        } else {
            if (function_exists('setproctitle')) {
                setproctitle('boris (worker)');
            }
            
            fclose($pipes[1]);
            $worker = new EvalWorker($pipes[0]);
            $worker->setLocal($this->_exports);
            $worker->setStartHooks($this->_startHooks);
            $worker->setFailureHooks($this->_failureHooks);
            $worker->setInspector($this->_inspector);
            $worker->start();
        }
    }
1295834
public function start() {
		ConnectionManager::getDataSource($this->_TaskServer->useDbConfig)->reconnect(array('persistent' => false));
		$this->_Shell->out("Task #{$this->_task['id']} started");
		$this->_task['started'] = $this->_getCurrentDateTime();
		$this->_task['stderr'] = '';
		$this->_task['stdout'] = '';
		$this->_TaskServer->started($this->_task);
		$this->_run();
		return $this->_task;
	}
242565
public function start()
    {
        if (! $this->checkForFFmpeg() ||
            ! $this->checkForDCA() ||
            ! $this->checkForLibsodium()) {
            return false;
        }

        // temp
        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            $this->emit('error', [new \Exception('The voice client does not work on Windows operating systems at the moment.')]);

            return false;
        }

        $this->initSockets();
    }
350855
public function start()
    {
        if ($this->isStarted()) {
            return true;
        }

        /*
         * Write and Close handlers are called after destructing objects since PHP 5.0.5.
         * Thus destructors can use sessions but session handler can't use objects.
         * So we are moving session closure before destructing objects.
         */
        session_register_shutdown();

        session_cache_limiter('none');

        if (!session_start()) {
            throw new \RuntimeException('Failed to start the session');
        }

        static::$started = true;

        return true;
    }
778470
public function run()
    {
        if ($this->runningInConsole()) {
            $kernel = $kernel = static::make('ConsoleKernel');

            $input = new Input();
            $output = new Output();

            $status = $kernel->handle($input, $output);

            $kernel->terminate($input, $status);

            exit($status);
        }
        else {
            $kernel = static::make('HttpKernel');

            $request = Request::createFromGlobals();
            $request::enableHttpMethodParameterOverride();
            $request->enableHttpRequestParameterOverride();
            $response = $kernel->handle($request);

            $response->send();

            $kernel->terminate($request, $response);
        }

        return true;
    }
793082
public function start()
    {
        if (!$this->hasStarted()) {
            $this->setStarted();
            $this->dispatch(RunEvent::STARTED, new RunEvent($this));
            try {
                try {
                    $output = call_user_func($this->callback);
                    $this->handleOutput($output);
                    $this->setFinished();
                    $this->successful = true;
                    $this->dispatch(RunEvent::SUCCESSFUL, new RunEvent($this));
                } catch (Exception $e) {
                    $this->setFinished();
                    $this->successful = false;
                    $this->exception = $e;
                    $this->dispatch(RunEvent::FAILED, new RunEvent($this));
                } catch (Throwable $e) {
                    $this->setFinished();
                    $this->successful = false;
                    $this->exception = $e;
                    $this->dispatch(RunEvent::FAILED, new RunEvent($this));
                }
            } finally {
                $this->dispatch(RunEvent::COMPLETED, new RunEvent($this));
            }
        }

        return $this;
    }
1226604
public function start()
  {
    // prevent starting if there is nothing to track
    if (ThrottlerHelper::componentsAreSet($this->components)
        && !$this->isActive())
    {
      $this->turnOn();
      $this->refreshInstance();
      return true;
    }
    return false;
  }
612643
public function monitorQueue() : bool
    {
        if ($this->jobsInQueue === 0) {
            return true;
        }
        foreach (array_keys($this->jobQueues) as $jobName) {
            if (empty($this->jobQueues[$jobName])) {
                continue;
            }
            if ($this->jobCanBeProcessed($jobName)) {
                continue;
            }
            $jobsCount = count($this->jobQueues[$jobName]);
            $this->jobQueues[$jobName] = [];
            $this->jobsInQueue -= $jobsCount;
        }
        return $this->pushJobs();
    }
36173
protected function startup()
    {
        $this->host->cleanup();
        $this->cleanup();
        $this->register();

        $cleaned = Job::cleanup($this->queues);
        if ($cleaned['zombie']) {
            $this->log('Failed <pop>'.$cleaned['zombie'].'</pop> zombie job'.($cleaned['zombie'] == 1 ? '' : 's'), Logger::NOTICE);
        }
        if ($cleaned['processed']) {
            $this->log('Cleared <pop>'.$cleaned['processed'].'</pop> processed job'.($cleaned['processed'] == 1 ? '' : 's'), Logger::NOTICE);
        }

        $this->setStatus(self::STATUS_RUNNING);

        Event::fire(Event::WORKER_STARTUP, $this);
    }