Skip to content

Added emission of kernel events for GearmanJob lifecycle#188

Open
Eloar wants to merge 1 commit into
mmoreram:3from
Eloar:3
Open

Added emission of kernel events for GearmanJob lifecycle#188
Eloar wants to merge 1 commit into
mmoreram:3from
Eloar:3

Conversation

@Eloar

@Eloar Eloar commented Jan 19, 2018

Copy link
Copy Markdown
  • added GearmanJobWrapper to support GearmanJob event emission
  • documentation enhanced

- added GearmanJobWrapper to support GearmanJob event emition
- documentation enhanced
@Eloar Eloar changed the title - added emission of kernel events for GearmanJob lifecycle Added emission of kernel events for GearmanJob lifecycle Jan 19, 2018
@bmeynell

Copy link
Copy Markdown

Is there an issue number or link to discussion anywhere prompting this PR? Curious about background/context.

@Eloar

Eloar commented Jan 31, 2018

Copy link
Copy Markdown
Author

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.

@bmeynell

bmeynell commented Jan 31, 2018

Copy link
Copy Markdown

@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.

@daum

daum commented Jan 31, 2018

Copy link
Copy Markdown
Collaborator

Yeah it would help to understand a bit more via an issue and why the existing kernel events didn't work in your case.

@Eloar

Eloar commented Feb 9, 2018

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants