aboutsummaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-03-12 11:01:46 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-03-12 11:01:46 +0100
commit75751d51de9185982f43e3d72206f1741939dfda (patch)
treed84f8cc60f2c2cf9412fb01f53c8faa788e918da /cron.php
parent9a5272870c5d8fd2d0c59bf9a8f1fe223a1ac2fc (diff)
downloadnextcloud-server-75751d51de9185982f43e3d72206f1741939dfda.tar.gz
nextcloud-server-75751d51de9185982f43e3d72206f1741939dfda.zip
fix: Call execute until it is removed for Job class
Because if an application extends execute it will change behavior without warning otherwise. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/cron.php b/cron.php
index 6f61bb0c2a2..3efe9faf744 100644
--- a/cron.php
+++ b/cron.php
@@ -172,7 +172,8 @@ try {
$memoryBefore = memory_get_usage();
$memoryPeakBefore = memory_get_peak_usage();
- $job->start($jobList);
+ /** 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);
+ /** Calling execute until it is removed, then will switch to start */
+ $job->execute($jobList);
$jobList->setLastJob($job);
}
OC_JSON::success();