Initial xentral_oss_20.3.c9ffacf
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Xentral\Modules\Pipedrive\Scheduler;
|
||||
|
||||
use ArrayObject;
|
||||
use Xentral\Modules\Pipedrive\Exception\PipedriveConfigurationException;
|
||||
use Xentral\Modules\Pipedrive\Exception\PipedriveEventException;
|
||||
use Xentral\Modules\Pipedrive\Exception\PipedriveMetaException;
|
||||
use Xentral\Modules\Pipedrive\Exception\PipedriveRequestQueuesException;
|
||||
use Xentral\Modules\Pipedrive\RequestQueues\PipedriveRequestQueuesService;
|
||||
|
||||
final class PipedriveProcessSchedulerTask implements PipedriveSchedulerTaskInterface
|
||||
{
|
||||
/** @var string */
|
||||
public const CALL_TYPE = 'pipedrive';
|
||||
|
||||
/** @var PipedriveRequestQueuesService $service */
|
||||
private $service;
|
||||
|
||||
/**
|
||||
* @param PipedriveRequestQueuesService $service
|
||||
*/
|
||||
public function __construct(PipedriveRequestQueuesService $service)
|
||||
{
|
||||
$this->service = $service;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws PipedriveConfigurationException
|
||||
* @throws PipedriveEventException
|
||||
* @throws PipedriveMetaException
|
||||
* @throws PipedriveRequestQueuesException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute(): void
|
||||
{
|
||||
$this->service->execute(self::CALL_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function cleanup(): void
|
||||
{
|
||||
$this->service->cleanup();
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function beforeScheduleAction(ArrayObject $data)
|
||||
{
|
||||
// TODO: Implement beforeScheduleAction() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function afterScheduleAction(ArrayObject $data)
|
||||
{
|
||||
// TODO: Implement afterScheduleAction() method.
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
Reference in New Issue
Block a user