diff options
author | Salvatore Martire <4652631+salmart-dev@users.noreply.github.com> | 2025-06-06 16:22:01 +0200 |
---|---|---|
committer | Salvatore Martire <4652631+salmart-dev@users.noreply.github.com> | 2025-07-07 15:59:48 +0200 |
commit | 7cd1360622b1798d4290abd5b03c38c8e3d7d31b (patch) | |
tree | 00894128085a8f3e70ba59643fd42032f23e34ff | |
parent | 9755dc47c05249369572d3c357d469e4ac8cc6ba (diff) | |
download | nextcloud-server-backport/53418/stable30.tar.gz nextcloud-server-backport/53418/stable30.zip |
fix: adjust setTimeout value for ClearOldStatusesBackgroundJobbackport/53418/stable30
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
-rw-r--r-- | apps/dav/lib/BackgroundJob/UserStatusAutomation.php | 5 | ||||
-rw-r--r-- | apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php index 8d5c229241d..f6fcc2536d1 100644 --- a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php +++ b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php @@ -38,8 +38,9 @@ class UserStatusAutomation extends TimedJob { private IUserManager $userManager) { parent::__construct($timeFactory); - // Interval 0 might look weird, but the last_checked is always moved - // to the next time we need this and then it's 0 seconds ago. + // interval = 0 might look odd, but it's intentional. last_run is set to + // the user's next available time, so the job runs immediately when + // that time comes. $this->setInterval(0); } diff --git a/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php b/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php index edf3b657724..91dcfafe71d 100644 --- a/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php +++ b/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php @@ -34,8 +34,7 @@ class ClearOldStatusesBackgroundJob extends TimedJob { parent::__construct($time); $this->mapper = $mapper; - // Run every time the cron is run - $this->setInterval(0); + $this->setInterval(60); } /** |