Closed orien closed 5 years ago
This is an interesting proposal @orien .
To me this could be a little context dependant. If a child process fails do you want / need the main thread to shutdown effecting the other running child processes? I can think of reasons for both sides of that argument.
Could be useful to have an option to toggle this behaviour rather than imposing this as a blanket rule.
I certainly agree that process management feels a little out of scope of the event_sourcery
gem as well.
That's a good point. I'll make the behaviour optional. That way teams can choose based on their circumstances.
I certainly agree that process management feels a little out of scope of the event_sourcery gem as well.
To my knowledge, literally, all of ~our~ Envato's ES apps handle this a little differently.
@orien do you know if any other teams/services have adopted the grouping similar to what RSS has?
Closed in favour of #216.
We're encountering a problem when running our event processors via the
ESPRunner
. When one of the event processors running in a child process fails and terminates prematurely, theESPRunner
just ignores the problem. Eventually, our event processor lag monitor will raise the alert to the on-call developer, who in turn can manually restart the ESPRunner.The process status list looks something like this:
Change
I propose that instead of ignoring the terminated child process, the
ESPRunner
could optionally consider this a catastrophic failure and (gracefully) stop the remaining child processes, before exiting itself with a status code indicating error. This would allow us to identify the problem earlier, and automatically resolve the problem by restarting theESPRunner
.Test Documentation
Considerations
I'm not convinced the EventSourcery gem should be responsible for such process management. We should probably be moving this functionality to a gem like Forked.