Skip to content

Commit

Permalink
fix background jobs
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky committed Mar 14, 2024
1 parent 2115eaa commit d827fca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/Backgroundjobs/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace OCA\Richdocuments\Backgroundjobs;

use OC\BackgroundJob\TimedJob;
use OCP\BackgroundJob\TimedJob;
use OCA\Richdocuments\Db\WopiMapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
Expand All @@ -34,7 +34,8 @@ class Cleanup extends TimedJob {
/** @var WopiMapper $wopiMapper */
private $wopiMapper;

public function __construct(IDBConnection $db, WopiMapper $wopiMapper) {
public function __construct(ITimeFactory $time, IDBConnection $db, WopiMapper $wopiMapper) {

Check failure on line 37 in lib/Backgroundjobs/Cleanup.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Backgroundjobs/Cleanup.php:37:30: UndefinedClass: Class, interface or enum named OCA\Richdocuments\Backgroundjobs\ITimeFactory does not exist (see https://psalm.dev/019)
parent::__construct($time);

Check failure on line 38 in lib/Backgroundjobs/Cleanup.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

InvalidArgument

lib/Backgroundjobs/Cleanup.php:38:23: InvalidArgument: Argument 1 of OCP\BackgroundJob\TimedJob::__construct expects OCP\AppFramework\Utility\ITimeFactory, but OCA\Richdocuments\Backgroundjobs\ITimeFactory provided (see https://psalm.dev/004)
$this->db = $db;
$this->wopiMapper = $wopiMapper;

Expand Down
2 changes: 1 addition & 1 deletion lib/Backgroundjobs/ObtainCapabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace OCA\Richdocuments\Backgroundjobs;

use OC\BackgroundJob\TimedJob;
use OCP\BackgroundJob\TimedJob;
use OCA\Richdocuments\Service\CapabilitiesService;

class ObtainCapabilities extends TimedJob {
Expand Down

0 comments on commit d827fca

Please sign in to comment.