diff --git a/lib/BackgroundJobs/MonthlyReport.php b/lib/BackgroundJobs/MonthlyReport.php index ccb0cc1..d81ddcc 100644 --- a/lib/BackgroundJobs/MonthlyReport.php +++ b/lib/BackgroundJobs/MonthlyReport.php @@ -23,6 +23,7 @@ use OC\BackgroundJob\TimedJob; use OCA\Survey_Client\AppInfo\Application; +use OCP\AppFramework\Http; class MonthlyReport extends TimedJob { @@ -40,7 +41,7 @@ protected function run($argument) { $collector = $application->getContainer()->query('OCA\Survey_Client\Collector'); $result = $collector->sendReport(); - if (!$result->succeeded()) { + if ($result->getStatus() !== Http::STATUS_OK) { \OC::$server->getLogger()->info('Error while sending usage statistic'); } }