Comments (8)
Sorry,
I found this that is what I was looking for
$result = $gearman->doJob();
$status = $gearman->getJobStatus($result);
So, If I've understood correctly the event can be triggered only from the worker instance.
from gearmanbundle.
Hi!
Sorry but I am not sure about what you need.
Please, specify exactly what you need so we can find the best solution :)
from gearmanbundle.
Hi!
Thank you for the answer. I'm trying to get response data from a worker (a "reverse callback" I guess -as in php.net speaking-), specifically get a callback from the class instance where the gearman client is calling the worker.
Hope to have been clearer this time :)
I think this is a meaningful example:
http://php.net/manual/en/gearman.examples-reverse-task.php
Thanks
from gearmanbundle.
Have you taked a look at Bundle kernel events ?
from gearmanbundle.
Yes, but I was looking to use the service container to get an event_dispatcher to bind reversed gearman events directly to the instanced class methods. Something like this:
$dispatcher = $this->getContainer()->get('event_dispatcher');
$dispatcher->addListener("gearman.client.callback.status", array($this, 'onStatus'));
Is this correct / feasible ?
Thank you!
from gearmanbundle.
Sorry, I got it at the end...
I was using a Job instead of a Task. Works a expected, thank you
from gearmanbundle.
Oh, great :D Any bundle feedback? Is being useful?
from gearmanbundle.
I'm still at a initial stage but looks extremely interesting.. I'll do my best to report any further possible optimization
Great work!
from gearmanbundle.
Related Issues (20)
- worker/job not executing correctly HOT 2
- Worker outside current project HOT 1
- worker list not working HOT 4
- Job iterations vs worker iterations HOT 3
- Problems with config file HOT 1
- Scrutinizer status not displayed
- Ready for Symfony 3 and/or PHP 7 HOT 7
- [Call For Help] - New maintainers for that Package HOT 12
- Methods visibility
- Define job callable name per Annotation HOT 2
- Symfony2 Mmoreram GearmanClient fails to load HOT 7
- Segmentation fault in 3.0.2 HOT 4
- Semantical versioning HOT 1
- Symfony3.3 removed deprecation error [Invalid key "kernel" found in arguments of method "__construct()" for service "gearman.parser"] HOT 3
- Use PSR6 instead of doctrine cache HOT 5
- Fail Job After N Seconds HOT 1
- Symfony 4 config deprecation HOT 2
- Symfony 4 getRootDir deprecation HOT 7
- Worker Describer outputs incorrect path for console when not in the kernel directory.
- Symfony 5 support ? HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gearmanbundle.