mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 04:58:46 +02:00
N°7008 - Fix missing background tasks in CRON when autoloaded and NOT in "developer_mode" (#578)
This commit is contained in:
@@ -44,12 +44,6 @@ if (!file_exists($sConfigFile))
|
||||
|
||||
require_once(APPROOT.'/application/startup.inc.php');
|
||||
|
||||
// Temporary fix until below bug is resolved properly:
|
||||
// N°7008 - Fix missing background tasks in CRON when NOT in "developer_mode"
|
||||
require_once(APPROOT.'/sources/SessionTracker/SessionGC.php');
|
||||
require_once(APPROOT.'/sources/Service/TemporaryObjects/TemporaryObjectGC.php');
|
||||
require_once(APPROOT.'/sources/Service/Notification/Event/EventiTopNotificationGC.php');
|
||||
|
||||
$oCtx = new ContextTag(ContextTag::TAG_CRON);
|
||||
|
||||
function ReadMandatoryParam($oP, $sParam, $sSanitizationFilter = 'parameter')
|
||||
@@ -414,14 +408,7 @@ function ReSyncProcesses($oP, $bVerbose, $bDebug)
|
||||
$oNow = new DateTime();
|
||||
|
||||
$aProcesses = array();
|
||||
foreach (get_declared_classes() as $sTaskClass)
|
||||
{
|
||||
$oRefClass = new ReflectionClass($sTaskClass);
|
||||
if ($oRefClass->isAbstract())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if ($oRefClass->implementsInterface('iProcess'))
|
||||
foreach (utils::GetClassesForInterface('iProcess', '', ['[\\\\/]lib[\\\\/]', '[\\\\/]node_modules[\\\\/]', '[\\\\/]test[\\\\/]', '[\\\\/]tests[\\\\/]']) as $sTaskClass)
|
||||
{
|
||||
$oProcess = new $sTaskClass;
|
||||
$aProcesses[$sTaskClass] = $oProcess;
|
||||
@@ -480,7 +467,6 @@ function ReSyncProcesses($oP, $bVerbose, $bDebug)
|
||||
unset($aTasks[$sTaskClass]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove all the tasks not having a valid class
|
||||
foreach ($aTasks as $oTask)
|
||||
|
||||
Reference in New Issue
Block a user