mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: adjust setTimeout value for ClearOldStatusesBackgroundJob
These jobs that were setting their interval to 0 were not really running at every run of cron.php if the run was in the same second. To keep the same behaior, I am updating those intervals to 1 second. Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
parent
bd00b75b29
commit
e4183236ed
2 changed files with 4 additions and 4 deletions
|
|
@ -40,8 +40,9 @@ class UserStatusAutomation extends TimedJob {
|
|||
) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ class ClearOldStatusesBackgroundJob extends TimedJob {
|
|||
) {
|
||||
parent::__construct($time);
|
||||
|
||||
// Run every time the cron is run
|
||||
$this->setInterval(0);
|
||||
$this->setInterval(60);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue