Closed cabol closed 8 years ago
I would prefer this for "listen to all events":
{events, [{my_super_manager, all}]}
@elbrujohalcon agreed. On other hand, I think the scenario "One event manager to handle events from different docs" might be cover setting the same manager to all docs, e.g.:
{events, [
{my_doc_1, my_event_manager},
{my_doc_2, my_event_manager},
{my_doc_3, my_event_manager},
. . .
]}
So the only case we still need to solve is: "Several event managers added to one doc". So the other option might be:
{events, [
{my_doc_1, my_event_manager},
{my_doc_2, my_event_manager},
{my_doc_3, [my_event_manager, other_event_manager]},
. . .
]}
I like your idea, @cabol and I would just add the option to specify '_'
as the doc name to represent all docs…
{events, [
{'_', [my_first_global_event_manager, my_second_global_event_manager]},
{my_doc_1, my_event_manager},
{my_doc_2, my_event_manager},
{my_doc_3, [my_event_manager, other_event_manager]},
. . .
]}
Perfect!
Currently
sumo
has a big limitation, events are attached to the docs, they keep a one-to-one relationship, which means, there is only one event to one doc. Therefore, it is not possible:Both scenarios are pretty common, so the idea is fix
sumo
to support this feature.One alternative to the config might be, instead of associate one doc to one manager like this:
Change the config to allow to define a manager with a filter, that might be a list with the docs that we want to get events: