Skip to content

Commit

Permalink
Merge pull request #3527 from nextcloud/fixBackgroundJobs
Browse files Browse the repository at this point in the history
fix background jobs
  • Loading branch information
juliusknorr authored Mar 14, 2024
2 parents 2115eaa + 483d9ed commit d21eacf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/Backgroundjobs/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@

namespace OCA\Richdocuments\Backgroundjobs;

use OC\BackgroundJob\TimedJob;
use OCA\Richdocuments\Db\WopiMapper;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;

Expand All @@ -34,7 +35,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) {
parent::__construct($time);
$this->db = $db;
$this->wopiMapper = $wopiMapper;

Expand Down
6 changes: 4 additions & 2 deletions lib/Backgroundjobs/ObtainCapabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@

namespace OCA\Richdocuments\Backgroundjobs;

use OC\BackgroundJob\TimedJob;
use OCA\Richdocuments\Service\CapabilitiesService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;

class ObtainCapabilities extends TimedJob {
/** @var CapabilitiesService */
private $capabilitiesService;

public function __construct(CapabilitiesService $capabilitiesService) {
public function __construct(ITimeFactory $time, CapabilitiesService $capabilitiesService) {
parent::__construct($time);
$this->capabilitiesService = $capabilitiesService;

$this->setInterval(60 * 60);
Expand Down

0 comments on commit d21eacf

Please sign in to comment.