Merge pull request #2167 from julceslauhub/master
Improvement related to the bug 13504
This commit is contained in:
@@ -309,6 +309,12 @@ class AppDelegation extends BaseAppDelegation
|
|||||||
public function calculateDuration ($cron = 0)
|
public function calculateDuration ($cron = 0)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
if ($cron == 1) {
|
||||||
|
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||||
|
$arrayCron["processcTimeStart"] = time();
|
||||||
|
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
||||||
|
}
|
||||||
|
|
||||||
//patch rows with initdate = null and finish_date
|
//patch rows with initdate = null and finish_date
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->clearSelectColumns();
|
$c->clearSelectColumns();
|
||||||
@@ -327,12 +333,6 @@ class AppDelegation extends BaseAppDelegation
|
|||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
|
|
||||||
while (is_array( $row )) {
|
while (is_array( $row )) {
|
||||||
if ($cron == 1) {
|
|
||||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
|
||||||
$arrayCron["processcTimeStart"] = time();
|
|
||||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
$oAppDel = AppDelegationPeer::retrieveByPk( $row['APP_UID'], $row['DEL_INDEX'] );
|
$oAppDel = AppDelegationPeer::retrieveByPk( $row['APP_UID'], $row['DEL_INDEX'] );
|
||||||
if (isset( $row['DEL_FINISH_DATE'] )) {
|
if (isset( $row['DEL_FINISH_DATE'] )) {
|
||||||
$oAppDel->setDelInitDate( $row['DEL_FINISH_DATE'] );
|
$oAppDel->setDelInitDate( $row['DEL_FINISH_DATE'] );
|
||||||
@@ -387,12 +387,6 @@ class AppDelegation extends BaseAppDelegation
|
|||||||
|
|
||||||
$now = strtotime( 'now' );
|
$now = strtotime( 'now' );
|
||||||
while (is_array( $row )) {
|
while (is_array( $row )) {
|
||||||
if ($cron == 1) {
|
|
||||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
|
||||||
$arrayCron["processcTimeStart"] = time();
|
|
||||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
$fTaskDuration = $row['TAS_DURATION'];
|
$fTaskDuration = $row['TAS_DURATION'];
|
||||||
$iDelegateDate = strtotime( $row['DEL_DELEGATE_DATE'] );
|
$iDelegateDate = strtotime( $row['DEL_DELEGATE_DATE'] );
|
||||||
$iInitDate = strtotime( $row['DEL_INIT_DATE'] );
|
$iInitDate = strtotime( $row['DEL_INIT_DATE'] );
|
||||||
@@ -476,6 +470,12 @@ class AppDelegation extends BaseAppDelegation
|
|||||||
$rs->next();
|
$rs->next();
|
||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($cron == 1) {
|
||||||
|
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||||
|
$arrayCron["processcTimeStart"] = time();
|
||||||
|
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
||||||
|
}
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
error_log( $oError->getMessage() );
|
error_log( $oError->getMessage() );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user