mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
fix(updatenotification): Fix log spam from ResetToken job
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
0b3041586b
commit
98ee89286d
1 changed files with 11 additions and 1 deletions
|
|
@ -43,7 +43,17 @@ class ResetToken extends TimedJob {
|
|||
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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue