Skip to content

Commit

Permalink
KOJO-201 | add API V1 AwareInterfaces to everything that actually use…
Browse files Browse the repository at this point in the history
…s them
  • Loading branch information
jpmarcotte committed Apr 2, 2021
1 parent d127241 commit c988a7c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/Api/V1/Job/Scheduler/FactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
use Neighborhoods\Kojo\Api\V1\Job\SchedulerInterface;
use Neighborhoods\Kojo\Service;

interface FactoryInterface
interface FactoryInterface extends AwareInterface
{
public function create(): SchedulerInterface;

/** @injected:configuration */
public function setApiV1JobScheduler(SchedulerInterface $apiV1JobScheduler);

/** @injected:configuration */
public function setServiceCreateFactory(Service\Create\FactoryInterface $serviceCreateFactory);
}
}
4 changes: 2 additions & 2 deletions src/Api/V1/Job/Type/Registrar/FactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Neighborhoods\Kojo\Api\V1\Job\Type\RegistrarInterface;

interface FactoryInterface
interface FactoryInterface extends AwareInterface
{
public function create(): RegistrarInterface;
}
}
4 changes: 3 additions & 1 deletion src/Api/V1/Worker/ServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

namespace Neighborhoods\Kojo\Api\V1\Worker;

use Neighborhoods\Kojo\Api\V1\Job\Scheduler;
use Neighborhoods\Kojo\Api\V1\Job\SchedulerInterface;
use Neighborhoods\Kojo\Api\V1\Logger;
use Neighborhoods\Kojo\Api\V1\LoggerInterface;
use Neighborhoods\Kojo\Data\JobInterface;
use Neighborhoods\Kojo\Service\Update\Hold;
Expand All @@ -12,7 +14,7 @@
use Neighborhoods\Kojo\Service\Update\Complete\Failed;
use Neighborhoods\Kojo\Apm;

interface ServiceInterface
interface ServiceInterface extends Scheduler\Factory\AwareInterface, Logger\AwareInterface
{
public function requestRetry(\DateTime $retryDateTime): ServiceInterface;

Expand Down
7 changes: 3 additions & 4 deletions src/ForemanInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

namespace Neighborhoods\Kojo;

use Neighborhoods\Kojo\Api\V1\RDBMS\Connection;
use Neighborhoods\Kojo\Api\V1\Worker;
use Neighborhoods\Kojo\Service\Update;
use Neighborhoods\Kojo\Api\V1\Worker\ServiceInterface;

interface ForemanInterface
interface ForemanInterface extends Connection\Service\AwareInterface, Worker\Service\AwareInterface
{
public function workWorker(): ForemanInterface;

public function setServiceUpdateWorkFactory(Update\Work\FactoryInterface $updateWorkFactory);

public function setApiV1WorkerService(ServiceInterface $workerService);
}

0 comments on commit c988a7c

Please sign in to comment.