Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jun 26, 2023
1 parent e08555c commit d6ac503
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 98 deletions.
94 changes: 0 additions & 94 deletions src/Factory/EngineDetector.php

This file was deleted.

13 changes: 9 additions & 4 deletions src/Service/Action/Queue/Consumer.php
Expand Up @@ -21,6 +21,7 @@
namespace Fusio\Impl\Service\Action\Queue;

use Doctrine\DBAL\Connection;
use Fusio\Engine\Action\Resolver\DatabaseAction;
use Fusio\Engine\Processor;
use Fusio\Impl\Repository\ActionDatabase;
use Fusio\Impl\Table\Generated\ActionQueueTable;
Expand All @@ -36,18 +37,20 @@ class Consumer
{
private Processor $processor;
private Connection $connection;
private DatabaseAction $databaseAction;

public function __construct(Processor $processor, Connection $connection)
public function __construct(Processor $processor, Connection $connection, DatabaseAction $databaseAction)
{
$this->processor = $processor;
$this->processor = $processor;
$this->connection = $connection;
$this->databaseAction = $databaseAction;
}

public function execute()
public function execute(): void
{
$repository = new ActionDatabase($this->connection);
$repository->setAsync(false);
$this->processor->push($repository);
$this->databaseAction->push($repository);

$qb = $this->connection->createQueryBuilder();
$qb->select([ActionQueueTable::COLUMN_ID, ActionQueueTable::COLUMN_ACTION, ActionQueueTable::COLUMN_REQUEST, ActionQueueTable::COLUMN_CONTEXT]);
Expand All @@ -70,5 +73,7 @@ public function execute()
// @TODO maybe log this in the future?
}
}

$this->databaseAction->pop();
}
}

0 comments on commit d6ac503

Please sign in to comment.