#!/usr/bin/env php getBasePath(), true); // Quit when in maintenance if (!$a->getMode()->has(App\Mode::MAINTENANCEDISABLED)) { return; } $a->setBaseURL(Config::get('system', 'url')); $spawn = array_key_exists('s', $options) || array_key_exists('spawn', $options); if ($spawn) { Worker::spawnWorker(); exit(); } $run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options); Worker::processQueue($run_cron); Worker::unclaimProcess(); Worker::endProcess();