mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
Merge branch 'hotfix/N2016'
This commit is contained in:
@@ -150,7 +150,7 @@ abstract class AsyncTask extends DBObject
|
|||||||
public function GetRetryDelay($iErrorCode = null)
|
public function GetRetryDelay($iErrorCode = null)
|
||||||
{
|
{
|
||||||
$iRetryDelay = 600;
|
$iRetryDelay = 600;
|
||||||
$aRetries = MetaModel::GetConfig()->Get('async_task_retries', array());
|
$aRetries = MetaModel::GetConfig()->Get('async_task_retries');
|
||||||
if (is_array($aRetries) && array_key_exists(get_class($this), $aRetries))
|
if (is_array($aRetries) && array_key_exists(get_class($this), $aRetries))
|
||||||
{
|
{
|
||||||
$aConfig = $aRetries[get_class($this)];
|
$aConfig = $aRetries[get_class($this)];
|
||||||
@@ -162,12 +162,13 @@ abstract class AsyncTask extends DBObject
|
|||||||
public function GetMaxRetries($iErrorCode = null)
|
public function GetMaxRetries($iErrorCode = null)
|
||||||
{
|
{
|
||||||
$iMaxRetries = 0;
|
$iMaxRetries = 0;
|
||||||
$aRetries = MetaModel::GetConfig()->Get('async_task_retries', array());
|
$aRetries = MetaModel::GetConfig()->Get('async_task_retries');
|
||||||
if (is_array($aRetries) && array_key_exists(get_class($this), $aRetries))
|
if (is_array($aRetries) && array_key_exists(get_class($this), $aRetries))
|
||||||
{
|
{
|
||||||
$aConfig = $aRetries[get_class($this)];
|
$aConfig = $aRetries[get_class($this)];
|
||||||
$iMaxRetries = $aConfig['max_retries'];
|
$iMaxRetries = $aConfig['max_retries'];
|
||||||
}
|
}
|
||||||
|
return $iMaxRetries;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -380,6 +381,6 @@ class AsyncSendEmail extends AsyncTask
|
|||||||
case EMAIL_SEND_ERROR:
|
case EMAIL_SEND_ERROR:
|
||||||
return "Failed: ".implode(', ', $aIssues);
|
return "Failed: ".implode(', ', $aIssues);
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user