return false;
}
- function is_already_running($task, $taskname, $timeout = 540) {
+ function is_already_running($taskname, $task = "", $timeout = 540) {
$lockpath = get_lockpath();
if ($lockpath != '') {
if (App::callstack() != "poller_run") {
if (App::maxload_reached())
return;
- if (App::is_already_running('include/cron.php', 'cron', 540))
+ if (App::is_already_running('cron', 'include/cron.php', 540))
return;
}
if (App::callstack() != "poller_run") {
if (App::maxload_reached())
return;
- if (App::is_already_running('include/cronhooks.php', 'cronhooks', 1140))
+ if (App::is_already_running('cronhooks', 'include/cronhooks.php', 1140))
return;
}
// Don't check this stuff if the function is called by the poller
if (App::callstack() != "poller_run")
- if (App::is_already_running('include/discover_poco.php', 'discover_poco'.$mode.urlencode($search), 1140))
+ if (App::is_already_running('discover_poco'.$mode.urlencode($search), 'include/discover_poco.php', 1140))
return;
$a->set_baseurl(get_config('system','url'));
// Don't check this stuff if the function is called by the poller
if (App::callstack() != "poller_run")
- if (App::is_already_running('', 'onepoll'.$contact_id, 540))
+ if (App::is_already_running('onepoll'.$contact_id, '', 540))
return;
$d = datetime_convert();
// Don't check this stuff if the function is called by the poller
if (App::callstack() != "poller_run")
- if (App::is_already_running("include/pubsubpublish.php", 'pubsubpublish', 540))
+ if (App::is_already_running("pubsubpublish", "include/pubsubpublish.php", 540))
return;
$a->set_baseurl(get_config('system','url'));
// Don't check this stuff if the function is called by the poller
if (App::callstack() != "poller_run")
- if (App::is_already_running('include/queue.php', 'queue', 540))
+ if (App::is_already_running('queue', 'include/queue.php', 540))
return;
$a->set_baseurl(get_config('system','url'));
// Don't check this stuff if the function is called by the poller
if (App::callstack() != "poller_run")
- if (App::is_already_running('', 'update_gcontact'.$contact_id, 540))
+ if (App::is_already_running('update_gcontact'.$contact_id, '', 540))
return;
$r = q("SELECT * FROM `gcontact` WHERE `id` = %d", intval($contact_id));