Webador / SlmQueue

Laminas / Mezzio module that integrates with various queue management systems.
Other
137 stars 56 forks source link

docs #202

Closed basz closed 6 years ago

basz commented 7 years ago

@svycka Does this make sense?

svycka commented 7 years ago

don't think so.. PR https://github.com/juriansluiman/SlmQueue/pull/201 affects only users who does not use zend-mvc and anyway they can still get eventmanager with this https://github.com/juriansluiman/SlmQueue/blob/master/src/Worker/AbstractWorker.php#L79 it is not a shared event manager but it is eventmanager anyway...

basz commented 7 years ago

so adding something like

or you should attach listeners to the manager from your Worker::getEventManager()

would be more accurate?

basz commented 7 years ago

or should we remove this doc at all and suggest Worker::getEventManager? https://github.com/basz/SlmQueue/blob/93d194af791b22ea8864dfc3f9665bfca02d9661/docs/6.Events.md#using-the-shared-event-manager

svycka commented 7 years ago

I think both are valid not sure with one is more accurate. but I would go with Worker::getEventManager since this is valid both ways.

svycka commented 7 years ago

@basz I didn't now we have this in docs but I guess this does not change anything since this example is for zend-mvc and still working. But I guess to be more clear and safe we could get not shared event manager but event manager from worker because who knows how it is created maybe someone is using different factory and this way using custom event manager... so using event manager from worker always will be safe..

svycka commented 7 years ago

I think that in next version maybe we could get ride of shared event manager at all? also not sure if this is important but with zend-mvc Worker::getEventManager will return SharedEventManager but without it will return just EventManager. Is this important and should return the same in both cases?

svycka commented 7 years ago

oh I was wrong.. Both has EventManager the difference is that EventManager from zend-mvc is created with attached shared event manager I guess this is the only difference. But anyway if event will be attached to event manager from Worker:getEventManager then there is no big difference if we will not use SharedEventManager and remove from docs or update docs to use event manager from Worker::getEventManager.

basz commented 7 years ago

I think that in next version maybe we could get ride of shared event manager at all

me too

svycka commented 7 years ago

if event manager is important in this module maybe would be good idea to introduce container key for eventmanager would be easier to add it.

roelvanduijnhoven commented 6 years ago

@basz And went ahead and merged the changes in master. Thanks!