Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Commit

Permalink
III-1491 Merge branch 'master' of github.com:cultuurnet/udb3-uitpas-s…
Browse files Browse the repository at this point in the history
…ervice

* 'master' of github.com:cultuurnet/udb3-uitpas-service:
  III-1491: Subscribe saga on uitpas event bus
  • Loading branch information
Luc Wollants committed Nov 10, 2016
2 parents e61d8a2 + 5ddcbee commit fd87b17
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,10 @@ function (Application $app) {
function (Application $app) {
$bus = new SimpleEventBus();

$bus->beforeFirstPublication(function (EventBusInterface $eventBus) {
$subscribers = [];
$bus->beforeFirstPublication(function (EventBusInterface $eventBus) use ($app) {
$subscribers = [
'saga_manager',
];

// Allow to override event bus subscribers through configuration.
if (isset($app['config']['event_bus']) &&
Expand Down Expand Up @@ -432,9 +434,13 @@ function (Application $app) {

$app['uitpas_sync_command_handler'] = $app->share(
function (Application $app) {
return new SyncCommandHandler(
$handler = new SyncCommandHandler(
$app['culturefeed_uitpas_client']
);

$handler->setLogger($app['logger.command_bus']);

return $handler;
}
);

Expand Down

0 comments on commit fd87b17

Please sign in to comment.