Merge pull request #44151 from nextcloud/fix/go-back-to-job-execute

pull/39611/head
Benjamin Gaussorgues 3 months ago committed by GitHub
commit 0b4b50d407
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -84,7 +84,8 @@ class Job extends Command {
$output->writeln('<error>Something went wrong when trying to retrieve Job with ID ' . $jobId . ' from database</error>');
return 1;
}
$job->start($this->jobList);
/** @psalm-suppress DeprecatedMethod Calling execute until it is removed, then will switch to start */
$job->execute($this->jobList);
$job = $this->jobList->getById($jobId);
if (($job === null) || ($lastRun !== $job->getLastRun())) {

@ -172,7 +172,8 @@ try {
$memoryBefore = memory_get_usage();
$memoryPeakBefore = memory_get_peak_usage();
$job->start($jobList);
/** @psalm-suppress DeprecatedMethod Calling execute until it is removed, then will switch to start */
$job->execute($jobList);
$memoryAfter = memory_get_usage();
$memoryPeakAfter = memory_get_peak_usage();
@ -207,7 +208,8 @@ try {
$job = $jobList->getNext();
if ($job != null) {
$logger->debug('WebCron call has selected job with ID ' . strval($job->getId()), ['app' => 'cron']);
$job->start($jobList);
/** @psalm-suppress DeprecatedMethod Calling execute until it is removed, then will switch to start */
$job->execute($jobList);
$jobList->setLastJob($job);
}
OC_JSON::success();

Loading…
Cancel
Save