-
Notifications
You must be signed in to change notification settings - Fork 7
How to run it ? #6
Comments
If I should put worker just in .php file - how to load $serviceManager to this file? |
Now i'm add function just to public/index.php and have this error
but i'm pass string as parameter, not array |
Solved only with this syntax
So feature to register job from class or Closure should be implemented in module. |
I suppose I could say I'm in a similar boat here trying to get things working. That being said I think I understand why the author of this module wrote things this way -- the Gearman extension appears to take in a string as a globally accessible function. Given that it seems that passing in an anonymous function, though intuitive and certainly my preference as well, it doesn't seem like it would work out given the way that the Gearman extension is written. --> From the php docs: Registers a function name with the job server with an optional timeout. The timeout specifies how many seconds the server will wait before marking a job as failed. If the timeout is set to zero, there is no timeout. Now, all that being said -- what is the suggested way to register the globally accessible functions without polluting the rest of the application's namespace? |
There is my error. I'm trying run it from Console controller.
Also I add function in this file (not in class)
What I'm doing wrong?
Can you please provide full example?
The text was updated successfully, but these errors were encountered: