Created task running system based on event listener which are transparently cast into tasks

This commit is contained in:
Alejandro Celaya
2019-07-18 19:07:07 +02:00
parent 0dfadcbb4a
commit bccc177414
15 changed files with 238 additions and 127 deletions

View File

@@ -3,15 +3,17 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\Core;
use Phly\Swoole\TaskWorker\DeferredListenerDelegator;
use Shlinkio\Shlink\Common\IpGeolocation\IpLocationResolverInterface;
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
return [
'events' => [
EventDispatcher\ShortUrlVisited::class => [
EventDispatcher\LocateShortUrlVisit::class,
'regular' => [],
'async' => [
EventDispatcher\ShortUrlVisited::class => [
EventDispatcher\LocateShortUrlVisit::class,
],
],
],
@@ -19,11 +21,6 @@ return [
'factories' => [
EventDispatcher\LocateShortUrlVisit::class => ConfigAbstractFactory::class,
],
'delegators' => [
EventDispatcher\LocateShortUrlVisit::class => [
DeferredListenerDelegator::class,
],
],
],
ConfigAbstractFactory::class => [