setInterval(24 * 60 * 60); /** * @todo remove checks with 24+ */ if (defined('\OCP\BackgroundJob\IJob::TIME_INSENSITIVE') && method_exists($this, 'setTimeSensitivity')) { $this->setTimeSensitivity(self::TIME_INSENSITIVE); } } /** * @param $argument * * @return void */ protected function run($argument) { try { $strategy = new Ipv4Strategy(); $this->trainService->train( $strategy->getDefaultMlpConfig(), TrainingDataConfig::default(), $strategy ); } catch (InsufficientDataException $ex) { $this->logger->info('No suspicious login model for IPv4 trained because of insufficient data', ['exception' => $ex]); } catch (Throwable $ex) { $this->logger->error('Caught unknown error during IPv4 background training', ['exception' => $ex]); } } }