mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Cancel async job when deleting command
This commit is contained in:
parent
7fe32caf2c
commit
231946ae58
@ -334,6 +334,7 @@ abstract class admin_cmd
|
|||||||
*/
|
*/
|
||||||
function delete()
|
function delete()
|
||||||
{
|
{
|
||||||
|
$this->cancel_periodic_job();
|
||||||
if ($this->status != admin_cmd::scheduled) return false;
|
if ($this->status != admin_cmd::scheduled) return false;
|
||||||
|
|
||||||
$this->status = admin_cmd::deleted;
|
$this->status = admin_cmd::deleted;
|
||||||
@ -1087,7 +1088,7 @@ abstract class admin_cmd
|
|||||||
*
|
*
|
||||||
* @return boolean true if job was canceled, false otherwise
|
* @return boolean true if job was canceled, false otherwise
|
||||||
*/
|
*/
|
||||||
protected function cancel_periodic_job()
|
public function cancel_periodic_job()
|
||||||
{
|
{
|
||||||
$async = new Api\Asyncservice();
|
$async = new Api\Asyncservice();
|
||||||
$job_id = empty($this->async_job_id) ? self::PERIOD_ASYNC_ID_PREFIX.$this->id : $this->async_job_id;
|
$job_id = empty($this->async_job_id) ? self::PERIOD_ASYNC_ID_PREFIX.$this->id : $this->async_job_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user