Cron/Queue: Setting a limit to avoid endless PHP jobs.
This commit is contained in:
parent
d964e7e08f
commit
58cea13707
|
@ -50,11 +50,14 @@ function cronhooks_run(&$argv, &$argc){
|
||||||
|
|
||||||
logger('cronhooks: start');
|
logger('cronhooks: start');
|
||||||
|
|
||||||
|
|
||||||
$d = datetime_convert();
|
$d = datetime_convert();
|
||||||
|
|
||||||
|
set_time_limit(9*60*60); // Setting the maximum execution time for cronjobs to 9 minutes.
|
||||||
|
|
||||||
call_hooks('cron', $d);
|
call_hooks('cron', $d);
|
||||||
|
|
||||||
|
logger('cronhooks: end');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,8 @@ function queue_run(&$argv, &$argc){
|
||||||
|
|
||||||
logger('queue: start');
|
logger('queue: start');
|
||||||
|
|
||||||
|
set_time_limit(9*60*60); // Setting the maximum execution time for queue job to 9 minutes.
|
||||||
|
|
||||||
handle_pubsubhubbub();
|
handle_pubsubhubbub();
|
||||||
|
|
||||||
$interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval')));
|
$interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval')));
|
||||||
|
|
Loading…
Reference in a new issue