Skip to content

Commit

Permalink
feat: mark background job for storage statistics as time insensitive
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
kesselb committed Nov 1, 2023
1 parent 85f91ec commit 81bf9ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Jobs/UpdateStorageStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@

use OCA\ServerInfo\StorageStatistics;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;
use OCP\IConfig;

class UpdateStorageStats extends TimedJob {
private StorageStatistics $storageStatistics;

public function __construct(ITimeFactory $time, StorageStatistics $storageStatistics, IConfig $config) {
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
$this->setInterval((int)$config->getAppValue('serverinfo', 'job_interval_storage_stats', (string)(60 * 60 * 3)));
parent::__construct($time);

Expand Down

0 comments on commit 81bf9ab

Please sign in to comment.