mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Fix background-job:execute command for QueuedJob instances
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
3920fc1ef2
commit
cc89da26c6
1 changed files with 5 additions and 1 deletions
|
|
@ -85,10 +85,14 @@ class Job extends Command {
|
|||
}
|
||||
|
||||
$job = $this->jobList->getById($jobId);
|
||||
if ($job === null) {
|
||||
$output->writeln('<error>Something went wrong when trying to retrieve Job with ID ' . $jobId . ' from database</error>');
|
||||
return 1;
|
||||
}
|
||||
$job->execute($this->jobList, $this->logger);
|
||||
$job = $this->jobList->getById($jobId);
|
||||
|
||||
if ($lastRun !== $job->getLastRun()) {
|
||||
if (($job === null) || ($lastRun !== $job->getLastRun())) {
|
||||
$output->writeln('<info>Job executed!</info>');
|
||||
$output->writeln('');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue