Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>
  • Loading branch information
artonge committed May 3, 2023
commit 8ad2f340453cade0bf0b37d02e5cdadf49381abb
3 changes: 2 additions & 1 deletion lib/private/BackgroundJob/JobList.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ private function buildJob(array $row): ?IJob {
$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;
}
}
Expand Down