Closed dav-m85 closed 9 years ago
If you're interested, I also implemented a backport for v2.3.3 here
Sadly, we're still using symfony 2.1 on some projects.
@dav-m85 Awesome!
Have you checked this feature is not BCBreak?
BTW, If you're using SF2.1 you can upgrade to SF2.6 right? I mean, there is no BC Break, so you shouldnt have any problem :S
It is not, I simply proxy the add_function call to capture new jobs and send the starting event.
The projet on which I intend to use the feature is dead locked on sf2.1, and I cannot upgrade past 2.3.3 because of the DoctrineCache dependency (which requires sf/framework 2.4). Backporting was quite easy so that's the solution I chose.
I added the ability to workers to end themselves on USR1 signal, you can have a look at it on https://github.com/lafourchette/GearmanBundle/pull/3
No BC-break so far. Would you like me to forward-porting this feature ?
Great. Would be nice to document these new features before merging.
Could you please add it? Or anyone?
Yes sure, I'll work on it.
Ping @dav-m85 Any documentation here?
@mmoreram Documentation added ! Not sure it is enough though, please give directions if not :)
@dav-m85 Awesome. I will merge this PR, and please, I will need some feedback :)
In order to implement a clean worker shutdown (incoming pull request), I need a new event to be dispatched when a worker starts to process a new job. I added testing for the existing GEARMAN_WORK_EXECUTED event, and for the new one.
I opened also a pull request against our company fork.