mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +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()
|
||||
{
|
||||
$this->cancel_periodic_job();
|
||||
if ($this->status != admin_cmd::scheduled) return false;
|
||||
|
||||
$this->status = admin_cmd::deleted;
|
||||
@ -1087,7 +1088,7 @@ abstract class admin_cmd
|
||||
*
|
||||
* @return boolean true if job was canceled, false otherwise
|
||||
*/
|
||||
protected function cancel_periodic_job()
|
||||
public function cancel_periodic_job()
|
||||
{
|
||||
$async = new Api\Asyncservice();
|
||||
$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