Skip to content
Merged
Changes from all commits
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
fix(updatenotification): Fix log spam from ResetToken job
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Nov 25, 2025
commit 98ee89286d0cf7984f27d587bab0863a12c9b37c
12 changes: 11 additions & 1 deletion apps/updatenotification/lib/BackgroundJob/ResetToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ protected function run($argument) {
return;
}

$secretCreated = $this->appConfig->getValueInt('core', 'updater.secret.created');
$secretCreated = $this->appConfig->getValueInt('core', 'updater.secret.created', 0);

if ($secretCreated === 0) {
if ($this->config->getSystemValueString('updater.secret') !== '') {
$this->logger->error('Cleared old `updater.secret` with unknown creation date', ['app' => 'updatenotification']);
$this->config->deleteSystemValue('updater.secret');
}
$this->logger->debug('Skipping `updater.secret` reset since there is none', ['app' => 'updatenotification']);
return;
}

// Delete old tokens after 2 days and also tokens without any created date
$secretCreatedDiff = $this->time->getTime() - $secretCreated;
if ($secretCreatedDiff >= 172800) {
Expand Down
Loading