You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
491 B

<?php
declare(ticks=1);
chdir(__DIR__.'/..');
$mode = 'run';
if(array_key_exists(1, $argv) && $argv[1] == 'once')
$mode = 'once';
if($mode == 'run') {
if(function_exists('pcntl_signal')) {
pcntl_signal(SIGINT, function($sig){
global $pcntl_continue;
$pcntl_continue = FALSE;
});
}
}
$pcntl_continue = TRUE;
define('PDO_SUPPORT_DELAYED', TRUE);
require 'vendor/autoload.php';
if($mode == 'once') {
DeferredTask::run_once();
} else {
DeferredTask::run();
}