GearmanBundle
GearmanBundle copied to clipboard
Added emission of kernel events for GearmanJob lifecycle
- added GearmanJobWrapper to support GearmanJob event emission
- documentation enhanced
Is there an issue number or link to discussion anywhere prompting this PR? Curious about background/context.
Hmm, I think there is none. I made this change so I could easier follow lifecycle of each job passed to worker. Based on that I could make listener storing progress of each task to MongoDB for any client to follow. Second use was to clear EntityManager before each job was started.
@Eloar - I see you included some documentation in your PR. Could you leverage that to create a GH issue and then associate this PR to that issue? My knee-jerk reaction was that we already have events that can be subscribed to so how is this PR different than what we currently have?
In general having an associated GH issue + PR that references it (instead of a single PR), as a rule of thumb, makes new users easier follow the progression of how changes came to be over time as well as overall context for the change. @daum - agree?
If cannot do, maybe I can squeeze in some time to create a GH based on the docs you provided.
Yeah it would help to understand a bit more via an issue and why the existing kernel events didn't work in your case.
I looked through issues list and my PR relates to #99. I'm using backgrounds jobs for all my workers. Async clients gets no information about job lifecycle (kind of obvious but poorly documented by Gearman itself). With my change I was able to emit events worker side and notify client different way in listeners.