Cron parallelization - change configuration param

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
Eric Espié
2022-07-05 17:14:23 +02:00
committed by Eric Espie
parent 43bc77784a
commit 149401931e
3 changed files with 4 additions and 4 deletions

View File

@@ -592,9 +592,9 @@ class Config
'source_of_value' => '',
'show_in_conf_sample' => false,
],
'cron.max_process' => [
'cron.max_processes' => [
'type' => 'integer',
'description' => 'Maximum number of cron process to run',
'description' => 'Maximum number of cron processes to run',
'default' => 10,
'value' => 10,
'source_of_value' => '',

View File

@@ -2045,7 +2045,7 @@ JS
return;
}
// Limit the number of cron process to run in parallel
$iMaxCronProcess = $oConfig->Get('cron.max_process');
$iMaxCronProcess = $oConfig->Get('cron.max_processes');
$iCount = 1;
$iMaxDuration = $oConfig->Get('cron_max_execution_time');
$iTimeLimit = time() + $iMaxDuration;

View File

@@ -191,7 +191,7 @@ function CronExec($oP, $bVerbose, $bDebug=false)
$iMaxDuration = MetaModel::GetConfig()->Get('cron_max_execution_time');
$iTimeLimit = $iStarted + $iMaxDuration;
$iCronSleep = MetaModel::GetConfig()->Get('cron_sleep');
$iMaxCronProcess = MetaModel::GetConfig()->Get('cron.max_process');
$iMaxCronProcess = MetaModel::GetConfig()->Get('cron.max_processes');
if ($bVerbose)
{