PMCORE-3196 CLONAR - [6261] La tarea 'Casos no asignados' en cron no funciona correctamente con 'system_utc_time_zone' habilitado
This commit is contained in:
@@ -2673,7 +2673,7 @@ class Bootstrap
|
|||||||
$context = [
|
$context = [
|
||||||
'ip' => G::getIpAddress(),
|
'ip' => G::getIpAddress(),
|
||||||
'workspace' => config('system.workspace', 'Undefined Workspace'),
|
'workspace' => config('system.workspace', 'Undefined Workspace'),
|
||||||
'timeZone' => DateTime::convertUtcToTimeZone(date('Y-m-d H:m:s')),
|
'timeZone' => DateTime::convertUtcToTimeZone(date('Y-m-d H:i:s')),
|
||||||
'usrUid' => G::LoadTranslation('UID_UNDEFINED_USER')
|
'usrUid' => G::LoadTranslation('UID_UNDEFINED_USER')
|
||||||
];
|
];
|
||||||
$context = array_merge($context, $extraParams);
|
$context = array_merge($context, $extraParams);
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class HomeTest extends TestCase
|
|||||||
'PRO_ID' => $process->PRO_ID,
|
'PRO_ID' => $process->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-1 year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-1 year"))
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$home = new Home($user->USR_UID);
|
$home = new Home($user->USR_UID);
|
||||||
@@ -415,7 +415,7 @@ class HomeTest extends TestCase
|
|||||||
'PRO_ID' => $process->PRO_ID,
|
'PRO_ID' => $process->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-1 year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-1 year"))
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$caseList = factory(CaseList::class)->create([
|
$caseList = factory(CaseList::class)->create([
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class UnassignedTest extends TestCase
|
|||||||
'PRO_ID' => $process->PRO_ID,
|
'PRO_ID' => $process->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-$i year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-$i year"))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ class UnassignedTest extends TestCase
|
|||||||
'PRO_ID' => $process->PRO_ID,
|
'PRO_ID' => $process->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-$i year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-$i year"))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ class UnassignedTest extends TestCase
|
|||||||
'PRO_ID' => $process->PRO_ID,
|
'PRO_ID' => $process->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-$i year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-$i year"))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
return $user;
|
return $user;
|
||||||
@@ -474,7 +474,7 @@ class UnassignedTest extends TestCase
|
|||||||
'PRO_ID' => $process1->PRO_ID,
|
'PRO_ID' => $process1->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-1 year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-1 year"))
|
||||||
]);
|
]);
|
||||||
$task2 = factory(Task::class)->create([
|
$task2 = factory(Task::class)->create([
|
||||||
'TAS_ASSIGN_TYPE' => 'SELF_SERVICE',
|
'TAS_ASSIGN_TYPE' => 'SELF_SERVICE',
|
||||||
@@ -494,7 +494,7 @@ class UnassignedTest extends TestCase
|
|||||||
'PRO_ID' => $process2->PRO_ID,
|
'PRO_ID' => $process2->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-2 year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-2 year"))
|
||||||
]);
|
]);
|
||||||
$unassigned = new Unassigned();
|
$unassigned = new Unassigned();
|
||||||
$unassigned->setUserId($user->USR_ID);
|
$unassigned->setUserId($user->USR_ID);
|
||||||
@@ -555,7 +555,7 @@ class UnassignedTest extends TestCase
|
|||||||
'PRO_ID' => $process1->PRO_ID,
|
'PRO_ID' => $process1->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-1 year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-1 year"))
|
||||||
]);
|
]);
|
||||||
$task2 = factory(Task::class)->create([
|
$task2 = factory(Task::class)->create([
|
||||||
'TAS_ASSIGN_TYPE' => 'SELF_SERVICE',
|
'TAS_ASSIGN_TYPE' => 'SELF_SERVICE',
|
||||||
@@ -575,7 +575,7 @@ class UnassignedTest extends TestCase
|
|||||||
'PRO_ID' => $process2->PRO_ID,
|
'PRO_ID' => $process2->PRO_ID,
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'USR_ID' => 0,
|
'USR_ID' => 0,
|
||||||
'DEL_DELEGATE_DATE' => date('Y-m-d H:m:s', strtotime("-2 year"))
|
'DEL_DELEGATE_DATE' => date('Y-m-d H:i:s', strtotime("-2 year"))
|
||||||
]);
|
]);
|
||||||
$unassigned = new Unassigned();
|
$unassigned = new Unassigned();
|
||||||
$unassigned->setUserId($user->USR_ID);
|
$unassigned->setUserId($user->USR_ID);
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ class CaseListTest extends TestCase
|
|||||||
'iconList' => 'deafult.png',
|
'iconList' => 'deafult.png',
|
||||||
'iconColor' => 'red',
|
'iconColor' => 'red',
|
||||||
'iconColorScreen' => 'blue',
|
'iconColorScreen' => 'blue',
|
||||||
'createDate' => date('Y-m-d H:m:s'),
|
'createDate' => date('Y-m-d H:i:s'),
|
||||||
'updateDate' => date('Y-m-d H:m:s')
|
'updateDate' => date('Y-m-d H:i:s')
|
||||||
];
|
];
|
||||||
$array = CaseList::getColumnNameFromAlias($data);
|
$array = CaseList::getColumnNameFromAlias($data);
|
||||||
|
|
||||||
@@ -81,8 +81,8 @@ class CaseListTest extends TestCase
|
|||||||
'CAL_ICON_LIST' => 'deafult.png',
|
'CAL_ICON_LIST' => 'deafult.png',
|
||||||
'CAL_ICON_COLOR' => 'red',
|
'CAL_ICON_COLOR' => 'red',
|
||||||
'CAL_ICON_COLOR_SCREEN' => 'blue',
|
'CAL_ICON_COLOR_SCREEN' => 'blue',
|
||||||
'CAL_CREATE_DATE' => date('Y-m-d H:m:s'),
|
'CAL_CREATE_DATE' => date('Y-m-d H:i:s'),
|
||||||
'CAL_UPDATE_DATE' => date('Y-m-d H:m:s')
|
'CAL_UPDATE_DATE' => date('Y-m-d H:i:s')
|
||||||
];
|
];
|
||||||
$array = CaseList::getAliasFromColumnName($data);
|
$array = CaseList::getAliasFromColumnName($data);
|
||||||
|
|
||||||
@@ -118,8 +118,8 @@ class CaseListTest extends TestCase
|
|||||||
'iconList' => 'deafult.png',
|
'iconList' => 'deafult.png',
|
||||||
'iconColor' => 'red',
|
'iconColor' => 'red',
|
||||||
'iconColorScreen' => 'blue',
|
'iconColorScreen' => 'blue',
|
||||||
'createDate' => date('Y-m-d H:m:s'),
|
'createDate' => date('Y-m-d H:i:s'),
|
||||||
'updateDate' => date('Y-m-d H:m:s')
|
'updateDate' => date('Y-m-d H:i:s')
|
||||||
];
|
];
|
||||||
$caseList = CaseList::createSetting($data, $data['userId']);
|
$caseList = CaseList::createSetting($data, $data['userId']);
|
||||||
|
|
||||||
@@ -152,8 +152,8 @@ class CaseListTest extends TestCase
|
|||||||
'iconList' => 'deafult.png',
|
'iconList' => 'deafult.png',
|
||||||
'iconColor' => 'red',
|
'iconColor' => 'red',
|
||||||
'iconColorScreen' => 'blue',
|
'iconColorScreen' => 'blue',
|
||||||
'createDate' => date('Y-m-d H:m:s'),
|
'createDate' => date('Y-m-d H:i:s'),
|
||||||
'updateDate' => date('Y-m-d H:m:s')
|
'updateDate' => date('Y-m-d H:i:s')
|
||||||
];
|
];
|
||||||
$model = CaseList::createSetting($data, $data['userId']);
|
$model = CaseList::createSetting($data, $data['userId']);
|
||||||
|
|
||||||
@@ -194,8 +194,8 @@ class CaseListTest extends TestCase
|
|||||||
'iconList' => 'deafult.png',
|
'iconList' => 'deafult.png',
|
||||||
'iconColor' => 'red',
|
'iconColor' => 'red',
|
||||||
'iconColorScreen' => 'blue',
|
'iconColorScreen' => 'blue',
|
||||||
'createDate' => date('Y-m-d H:m:s'),
|
'createDate' => date('Y-m-d H:i:s'),
|
||||||
'updateDate' => date('Y-m-d H:m:s')
|
'updateDate' => date('Y-m-d H:i:s')
|
||||||
];
|
];
|
||||||
$model = CaseList::createSetting($data, $data['userId']);
|
$model = CaseList::createSetting($data, $data['userId']);
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ try {
|
|||||||
$array['APP_TITLE'] = $Fields['TITLE'];
|
$array['APP_TITLE'] = $Fields['TITLE'];
|
||||||
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
|
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
|
||||||
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
|
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
|
||||||
$array['DATEPRINT'] = date( 'Y-m-d H:m:s' );
|
$array['DATEPRINT'] = date( 'Y-m-d H:i:s' );
|
||||||
}
|
}
|
||||||
$array['APP_PROCESS'] = $sProcess;
|
$array['APP_PROCESS'] = $sProcess;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ try {
|
|||||||
$array['APP_TITLE'] = $Fields['TITLE'];
|
$array['APP_TITLE'] = $Fields['TITLE'];
|
||||||
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
|
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
|
||||||
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
|
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
|
||||||
$array['DATEPRINT'] = date( 'Y-m-d H:m:s' );
|
$array['DATEPRINT'] = date( 'Y-m-d H:i:s' );
|
||||||
}
|
}
|
||||||
$array['APP_PROCESS'] = $sProcess;
|
$array['APP_PROCESS'] = $sProcess;
|
||||||
|
|
||||||
|
|||||||
@@ -4140,10 +4140,15 @@ class Cases
|
|||||||
|
|
||||||
// Add the time in the corresponding unit to the delegation date
|
// Add the time in the corresponding unit to the delegation date
|
||||||
$delegateDate = calculateDate($delegateDate, $taskSelfServiceTimeUnit, $taskSelfServiceTime);
|
$delegateDate = calculateDate($delegateDate, $taskSelfServiceTimeUnit, $taskSelfServiceTime);
|
||||||
|
$datetime = new DateTime($delegateDate);
|
||||||
|
//please the seconds is variant not must be considered
|
||||||
|
$delegateDate = $datetime->format('Y-m-d H:i:00');
|
||||||
|
|
||||||
// Define the current time
|
// Define the current time
|
||||||
$datetime = new DateTime('now');
|
$datetime = new DateTime('now');
|
||||||
$currentDate = $datetime->format('Y-m-d H:i:s');
|
//please the seconds is variant not must be considered
|
||||||
|
$currentDate = $datetime->format('Y-m-d H:i:00');
|
||||||
|
$currentDate = UtilDateTime::convertDataToUtc($currentDate);
|
||||||
|
|
||||||
// Check if the triggers to be executed
|
// Check if the triggers to be executed
|
||||||
if ($currentDate >= $delegateDate && $flagExecuteOnce) {
|
if ($currentDate >= $delegateDate && $flagExecuteOnce) {
|
||||||
@@ -4208,8 +4213,10 @@ class Cases
|
|||||||
'tasUid' => $taskUid,
|
'tasUid' => $taskUid,
|
||||||
'selfServiceTime' => $taskSelfServiceTime,
|
'selfServiceTime' => $taskSelfServiceTime,
|
||||||
'selfServiceTimeUnit' => $taskSelfServiceTimeUnit,
|
'selfServiceTimeUnit' => $taskSelfServiceTimeUnit,
|
||||||
|
'currentDate' => $currentDate,
|
||||||
|
'delegateDate' => $delegateDate
|
||||||
];
|
];
|
||||||
Log::channel(':TriggerExecution')->info('Timeout trigger execution', Bootstrap::context($context));
|
Log::channel('taskScheduler:executeSelfServiceTimeout')->info('TriggerExecution', Bootstrap::context($context));
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($_SESSION["PROCESS"]);
|
unset($_SESSION["PROCESS"]);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class Task
|
|||||||
public function resendEmails($now, $dateSystem)
|
public function resendEmails($now, $dateSystem)
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:resendEmails')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($now, $dateSystem, $scheduledTaskIdentifier) {
|
$job = function() use($now, $dateSystem, $scheduledTaskIdentifier) {
|
||||||
$this->setExecutionMessage("Resending emails");
|
$this->setExecutionMessage("Resending emails");
|
||||||
@@ -189,7 +189,7 @@ class Task
|
|||||||
$context = [
|
$context = [
|
||||||
"trace" => $e->getTraceAsString()
|
"trace" => $e->getTraceAsString()
|
||||||
];
|
];
|
||||||
Log::channel('taskScheduler:taskScheduler')->error($e->getMessage(), Bootstrap::context($context));
|
Log::channel('taskScheduler:resendEmails')->error($e->getMessage(), Bootstrap::context($context));
|
||||||
$criteria = new Criteria("workflow");
|
$criteria = new Criteria("workflow");
|
||||||
$criteria->clearSelectColumns();
|
$criteria->clearSelectColumns();
|
||||||
$criteria->addSelectColumn(ConfigurationPeer::CFG_UID);
|
$criteria->addSelectColumn(ConfigurationPeer::CFG_UID);
|
||||||
@@ -212,7 +212,7 @@ class Task
|
|||||||
$this->saveLog("resendEmails", "error", "Error Resending Emails: " . $e->getMessage());
|
$this->saveLog("resendEmails", "error", "Error Resending Emails: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:resendEmails')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ class Task
|
|||||||
public function unpauseApplications($now)
|
public function unpauseApplications($now)
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:unpauseApplications')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($now, $scheduledTaskIdentifier) {
|
$job = function() use($now, $scheduledTaskIdentifier) {
|
||||||
$this->setExecutionMessage("Unpausing applications");
|
$this->setExecutionMessage("Unpausing applications");
|
||||||
@@ -242,7 +242,7 @@ class Task
|
|||||||
$this->saveLog('unpauseApplications', 'error', 'Error Unpausing Applications: ' . $e->getMessage());
|
$this->saveLog('unpauseApplications', 'error', 'Error Unpausing Applications: ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:unpauseApplications')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ class Task
|
|||||||
function executeCaseSelfService()
|
function executeCaseSelfService()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:executeCaseSelfService')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
try {
|
try {
|
||||||
@@ -275,7 +275,7 @@ class Task
|
|||||||
$this->saveLog("unassignedCase", "error", "Error in unassigned case: " . $e->getMessage());
|
$this->saveLog("unassignedCase", "error", "Error in unassigned case: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:executeCaseSelfService')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -286,7 +286,7 @@ class Task
|
|||||||
public function calculateDuration()
|
public function calculateDuration()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:calculateDuration')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
$this->setExecutionMessage("Calculating Duration");
|
$this->setExecutionMessage("Calculating Duration");
|
||||||
@@ -303,7 +303,7 @@ class Task
|
|||||||
$this->saveLog('calculateDuration', 'error', 'Error Calculating Duration: ' . $e->getMessage());
|
$this->saveLog('calculateDuration', 'error', 'Error Calculating Duration: ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:calculateDuration')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -314,7 +314,7 @@ class Task
|
|||||||
public function calculateAppDuration()
|
public function calculateAppDuration()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:calculateAppDuration')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
$this->setExecutionMessage("Calculating Duration by Application");
|
$this->setExecutionMessage("Calculating Duration by Application");
|
||||||
@@ -331,7 +331,7 @@ class Task
|
|||||||
$this->saveLog('calculateDurationByApp', 'error', 'Error Calculating Duration: ' . $e->getMessage());
|
$this->saveLog('calculateDurationByApp', 'error', 'Error Calculating Duration: ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:calculateAppDuration')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -342,7 +342,7 @@ class Task
|
|||||||
public function cleanSelfServiceTables()
|
public function cleanSelfServiceTables()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:cleanSelfServiceTables')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
try {
|
try {
|
||||||
@@ -373,7 +373,7 @@ class Task
|
|||||||
$this->saveLog("ExecuteCleanSelfServiceTables", "error", "Error when try to clean self-service tables " . $e->getMessage());
|
$this->saveLog("ExecuteCleanSelfServiceTables", "error", "Error when try to clean self-service tables " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:cleanSelfServiceTables')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -385,7 +385,7 @@ class Task
|
|||||||
public function executePlugins()
|
public function executePlugins()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:executePlugins')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
$pathCronPlugins = PATH_CORE . 'bin' . PATH_SEP . 'plugins' . PATH_SEP;
|
$pathCronPlugins = PATH_CORE . 'bin' . PATH_SEP . 'plugins' . PATH_SEP;
|
||||||
@@ -429,7 +429,7 @@ class Task
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:executePlugins')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -475,7 +475,7 @@ class Task
|
|||||||
public function fillReportByUser($dateInit, $dateFinish)
|
public function fillReportByUser($dateInit, $dateFinish)
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:fillReportByUser')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
if ($dateInit == null) {
|
if ($dateInit == null) {
|
||||||
if ($this->asynchronous === false) {
|
if ($this->asynchronous === false) {
|
||||||
@@ -484,7 +484,7 @@ class Task
|
|||||||
}
|
}
|
||||||
if ($this->asynchronous === true) {
|
if ($this->asynchronous === true) {
|
||||||
$message = 'You must enter the starting date. Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"';
|
$message = 'You must enter the starting date. Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"';
|
||||||
Log::channel('taskScheduler:taskScheduler')->info($message, Bootstrap::context());
|
Log::channel('taskScheduler:fillReportByUser')->info($message, Bootstrap::context());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -506,7 +506,7 @@ class Task
|
|||||||
$this->saveLog("fillReportByUser", "error", "Error in fill report by user: " . $e->getMessage());
|
$this->saveLog("fillReportByUser", "error", "Error in fill report by user: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:fillReportByUser')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -520,7 +520,7 @@ class Task
|
|||||||
public function fillReportByProcess($dateInit, $dateFinish)
|
public function fillReportByProcess($dateInit, $dateFinish)
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:fillReportByProcess')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
if ($dateInit == null) {
|
if ($dateInit == null) {
|
||||||
if ($this->asynchronous === false) {
|
if ($this->asynchronous === false) {
|
||||||
@@ -529,7 +529,7 @@ class Task
|
|||||||
}
|
}
|
||||||
if ($this->asynchronous === true) {
|
if ($this->asynchronous === true) {
|
||||||
$message = 'You must enter the starting date. Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"';
|
$message = 'You must enter the starting date. Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"';
|
||||||
Log::channel('taskScheduler:taskScheduler')->info($message, Bootstrap::context());
|
Log::channel('taskScheduler:fillReportByProcess')->info($message, Bootstrap::context());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -551,7 +551,7 @@ class Task
|
|||||||
$this->saveLog("fillReportByProcess", "error", "Error in fill report by process: " . $e->getMessage());
|
$this->saveLog("fillReportByProcess", "error", "Error in fill report by process: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:fillReportByProcess')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -563,14 +563,14 @@ class Task
|
|||||||
public function ldapcron($debug)
|
public function ldapcron($debug)
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:ldapcron')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($debug, $scheduledTaskIdentifier) {
|
$job = function() use($debug, $scheduledTaskIdentifier) {
|
||||||
require_once(PATH_HOME . 'engine' . PATH_SEP . 'methods' . PATH_SEP . 'services' . PATH_SEP . 'ldapadvanced.php');
|
require_once(PATH_HOME . 'engine' . PATH_SEP . 'methods' . PATH_SEP . 'services' . PATH_SEP . 'ldapadvanced.php');
|
||||||
$ldapadvancedClassCron = new ldapadvancedClassCron();
|
$ldapadvancedClassCron = new ldapadvancedClassCron();
|
||||||
$ldapadvancedClassCron->executeCron($debug);
|
$ldapadvancedClassCron->executeCron($debug);
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:ldapcron')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -581,7 +581,7 @@ class Task
|
|||||||
function sendNotifications()
|
function sendNotifications()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:sendNotifications')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
try {
|
try {
|
||||||
@@ -627,7 +627,7 @@ class Task
|
|||||||
$this->saveLog("ExecuteSendNotifications", "error", "Error when sending notifications " . $e->getMessage());
|
$this->saveLog("ExecuteSendNotifications", "error", "Error when sending notifications " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:sendNotifications')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -638,13 +638,13 @@ class Task
|
|||||||
public function actionsByEmailResponse()
|
public function actionsByEmailResponse()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:actionsByEmailResponse')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
$responseReader = new ResponseReader();
|
$responseReader = new ResponseReader();
|
||||||
$responseReader->actionsByEmailEmailResponse();
|
$responseReader->actionsByEmailEmailResponse();
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:actionsByEmailResponse')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -655,13 +655,13 @@ class Task
|
|||||||
public function messageeventcron()
|
public function messageeventcron()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:messageeventcron')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use($scheduledTaskIdentifier) {
|
$job = function() use($scheduledTaskIdentifier) {
|
||||||
$messageApplication = new MessageApplication();
|
$messageApplication = new MessageApplication();
|
||||||
$messageApplication->catchMessageEvent(true);
|
$messageApplication->catchMessageEvent(true);
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:messageeventcron')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -675,13 +675,13 @@ class Task
|
|||||||
public function timerEventCron($datetime, $frontEnd)
|
public function timerEventCron($datetime, $frontEnd)
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:timerEventCron')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use ($datetime, $frontEnd, $scheduledTaskIdentifier) {
|
$job = function() use ($datetime, $frontEnd, $scheduledTaskIdentifier) {
|
||||||
$timerEvent = new TimerEvent();
|
$timerEvent = new TimerEvent();
|
||||||
$timerEvent->startContinueCaseByTimerEvent($datetime, $frontEnd);
|
$timerEvent->startContinueCaseByTimerEvent($datetime, $frontEnd);
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:timerEventCron')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
@@ -692,12 +692,12 @@ class Task
|
|||||||
public function webEntriesCron()
|
public function webEntriesCron()
|
||||||
{
|
{
|
||||||
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
$scheduledTaskIdentifier = uniqid(__FUNCTION__ . "#");
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:webEntriesCron')->info("Start {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
|
|
||||||
$job = function() use ($scheduledTaskIdentifier) {
|
$job = function() use ($scheduledTaskIdentifier) {
|
||||||
WebEntry::deleteOldWebEntries();
|
WebEntry::deleteOldWebEntries();
|
||||||
|
|
||||||
Log::channel('taskScheduler:taskScheduler')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
Log::channel('taskScheduler:webEntriesCron')->info("Finish {$scheduledTaskIdentifier}", Bootstrap::context());
|
||||||
};
|
};
|
||||||
$this->runTask($job);
|
$this->runTask($job);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user