mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-24 23:49:28 +00:00
Improvements and updated documentation
This commit is contained in:
@@ -52,7 +52,7 @@ class LongRunTaskLib extends JobsQueueLib
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all the LRT that are running more then CFG_LRT_MAX_RUN hours
|
||||
*/
|
||||
public function getHangingLRTs()
|
||||
{
|
||||
@@ -109,6 +109,20 @@ class LongRunTaskLib extends JobsQueueLib
|
||||
if (isError($updateLrtResult)) return $updateLrtResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the LRT in the queue as failed
|
||||
*/
|
||||
public function lrtExecFailed($jobid)
|
||||
{
|
||||
return $this->_ci->JobsQueueModel->update(
|
||||
$jobid,
|
||||
array(
|
||||
'endtime' => 'NOW()',
|
||||
'status' => self::STATUS_FAILED
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods used by the front end applications (standard controllers/end points, ex. controllers/system/LRTTest.php)
|
||||
|
||||
@@ -209,11 +223,17 @@ class LongRunTaskLib extends JobsQueueLib
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Set the LRT in the queue as successfully ended
|
||||
*/
|
||||
public function setStatus($jobid, $status)
|
||||
public function lrtExecOver($jobid)
|
||||
{
|
||||
return $this->_ci->JobsQueueModel->update($jobid, array('status' => $status));
|
||||
return $this->_ci->JobsQueueModel->update(
|
||||
$jobid,
|
||||
array(
|
||||
'endtime' => 'NOW()',
|
||||
'status' => self::STATUS_DONE
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user