feature/cierres #25

Open
aldarien wants to merge 446 commits from feature/cierres into develop
223 changed files with 753 additions and 7429 deletions
Showing only changes of commit 95a6aa96e9 - Show all commits

View File

@ -0,0 +1,6 @@
<?php
use Incoviba\Controller\API\Queues;
$app->group('/queue', function($app) {
$app->get('/run[/]', Queues::class);
});

View File

@ -0,0 +1,23 @@
<?php
namespace Incoviba\Controller\API;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Incoviba\Common\Ideal;
use Incoviba\Service;
class Queues extends Ideal\Controller
{
use withJson;
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, Service\Queue $queueService): ResponseInterface
{
$output = [
'success' => false
];
if ($queueService->run()) {
$output['success'] = true;
}
return $this->withJson($response, $output);
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace Incoviba\Service\Worker;
use Incoviba\Common\Ideal;
use Incoviba\Model;
use Incoviba\Service;
class Dummy extends Ideal\Service implements Service\Worker
{
public function execute(Model\Job $job): bool
{
$configuration = $job->configuration;
$this->logger->info('Dummy worker executed', ['configuration' => $configuration]);
return true;
}
}