Add RXQUEUE_CRON constant to distinguish when cron is running

This commit is contained in:
Kijin Sung 2024-10-10 23:43:04 +09:00
parent 0fd3b42885
commit f6a458f648

View file

@ -6,14 +6,16 @@
* Unlike other scripts provided with Rhymix, it can be called
* both on the command line and over the network.
*/
define('RXQUEUE_CRON', true);
// If called on the CLI, run additional checks.
if (PHP_SAPI === 'cli')
{
require_once __DIR__ . '/common.php';
}
else
{
// If called over the network, bypass CLI checks.
// If called over the network, load Rhymix directly.
chdir(dirname(dirname(__DIR__)));
require_once dirname(__DIR__) . '/autoload.php';
Context::init();