mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Remove job from oc_jobs when the file is not findable
When an application is disabled, or when a background jobs is removed by the app developer, then the job won't be found. In those cases, it makes sense to remove those jobs from oc_job. Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
d95ccfd3ae
commit
8ad2f34045
1 changed files with 2 additions and 1 deletions
|
|
@ -307,7 +307,8 @@ class JobList implements IJobList {
|
|||
$class = $row['class'];
|
||||
$job = new $class();
|
||||
} else {
|
||||
// job from disabled app or old version of an app, no need to do anything
|
||||
// Remove job from disabled app or old version of an app
|
||||
$this->removeById($row['id']);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue