Skip to content


Subversion checkout URL

You can clone with
Download ZIP


get_job_status raises gearman.errors.InvalidClientState exception #1

JustinAzoff opened this Issue · 6 comments

2 participants


probably doing something wrong here.. but...

>>> j=c.submit_job("config", ip,wait_until_complete=False)
>>> c.get_job_status(j)
<GearmanJobRequest task='config', unique='c468734f3bfe4786e486be6651877ed7', priority=None, background=False, state='CREATED', timed_out=False>
>>> c.get_job_status(j)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/gearman/", line 127, in get_job_status
  File "build/bdist.linux-x86_64/egg/gearman/", line 141, in get_job_statuses
  File "build/bdist.linux-x86_64/egg/gearman/", line 158, in wait_until_job_statuses_received
  File "build/bdist.linux-x86_64/egg/gearman/", line 194, in poll_connections_until_stopped
  File "build/bdist.linux-x86_64/egg/gearman/", line 160, in handle_connection_activity
  File "build/bdist.linux-x86_64/egg/gearman/", line 218, in handle_read
  File "build/bdist.linux-x86_64/egg/gearman/", line 39, in fetch_commands
  File "build/bdist.linux-x86_64/egg/gearman/", line 65, in recv_command
  File "build/bdist.linux-x86_64/egg/gearman/", line 142, in recv_status_res
  File "build/bdist.linux-x86_64/egg/gearman/", line 57, in _assert_request_state
gearman.errors.InvalidClientState: Expected handle (H:dell:333) to be in state 'CREATED', got 'COMPLETE'

Hmmm what would you expect to happen? Also are you using 2.0.1 or 2.0.0? I recently changed some of the update behavior


I have 2.0.1..

I expected it to return

<GearmanJobRequest task='config', unique='c468734f3bfe4786e486be6651877ed7', priority=None, background=False, state='COMPLETE', timed_out=False>

the second time..


K, I'll try to submit a patch today


Patch submitted. Its currently on the development branch if you'd like to pull it down. Because it was a 1-line change I may punt on a version change. Thoughts?


works great now :-)


Closed with python-gearman 2.0.2

Thanks for the bug report!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.