Comments (4)
This may be helpful: #61 (comment)
from python-gearman.
Ok, if I understood well it says to send the GEARMAN_COMMAND_GET_STATUS command that answers with a message like this:
{'known': '1', 'numerator': '0', 'running': '1', 'denominator': '0', 'job_handle': 'H:lab-vm12:2266'}
But it only says if there is a job running, and after the worker has finished it turns to:
{'known': '0', 'numerator': '0', 'running': '0', 'denominator': '0', 'job_handle': 'H:lab-vm12:2266'}
So I cannot reach the resulting data.
Is there a command such as "GEARMAN_COMMAND_GET_WORKING_DATA" that I can send to the gearman server to obtain the job result?
from python-gearman.
The easiest way to handle this with background jobs is to use job_handle as a key in an alternative storage engine and then looking the data up there if known==0, running==0 and you're sure that the job has existed (use job_handle for that).
Unfortunately GET_STATUS responses will say known==0 && running==0 for both jobs that have finished and jobs that never existed in the first place. This goes beyond the use case of Gearman, use alternative storage in your application to keep track of it and populate the key there (job_handle) with the status msgs that you want to access later.
from python-gearman.
WORK_STATUS is only for non-background jobs. With background jobs you have to substitute Gearman's WORK_STATUS. I think the Gearman daemon even drops the status of background jobs entirely once executed.
from python-gearman.
Related Issues (20)
- Worker intermittently lost connection with some gearmand servers HOT 3
- https://pypi.python.org/pypi/gearman/ HOT 6
- after_poll HOT 5
- Need option to force use of select()
- 100% CPU load after refactoring poll_connections_once HOT 1
- Get job_id from worker code HOT 1
- util.Stopwatch always returns "True" for has_time_remaining
- Is there a way to get a job's status given a job handle? HOT 2
- how to specify a definite node where the job running on ?
- GearmanAdminClientClient.get_workers() is unable to parse worker IDs with spaces.
- Discard task on exception in decode step HOT 1
- Release v2.0.3 HOT 2
- how to get job status by handle
- KeyError occurs when we receivea job handle that is not in handle_to_request_map when the client is executing recv_* commands
- request in handle_to_request_map will not clear if backgroupd is True
- ipv6 support
- Crashing
- No idea how to run tests/Python 3 support HOT 3
- Should I use return or send_job_data()?
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 python-gearman.