Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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 <[email protected]>
  • Loading branch information
salmart-dev committed Jul 1, 2025
commit e4183236ed40bcf33d50fa9c3882400186f4536b
5 changes: 3 additions & 2 deletions apps/dav/lib/BackgroundJob/UserStatusAutomation.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ public function __construct(
) {
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public function __construct(
) {
parent::__construct($time);

// Run every time the cron is run
$this->setInterval(0);
$this->setInterval(60);
}

/**
Expand Down