Closed nerrad closed 8 years ago
@nerrad Sounds good to me, @cmmarslender thoughts?
Note, The public api is fairly limited though. Just register
and work
. If you need to extend the implementation, you might want to checkout the constants, WP_GEARS_CLIENT_CLASS
and WP_GEARS_WORKER_CLASS
. These allow you to swap out the default Gearman implementation with a custom one.
Yah I'm aware I can use the constant and will do that if adding GearmanJob instance to the actions is not desired. It's preferable to use the action though so any further changes made to the bundled class are easier to manage (especially when its for a minor thing like adding logging or something like that).
Is there opposition to including the instance of GearmanJob as an argument on these actions? The primary purpose is so that the instance is exposed for any client code hooking in to do things. An example is I want to log the
$job->unique()
along with other attributes of what's happening when its being executed.If no opposition I can whip up a pull request. Something like: