Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

get_job_status raises gearman.errors.InvalidClientState exception #1

Closed
JustinAzoff opened this issue Oct 22, 2010 · 6 comments
Closed

Comments

@JustinAzoff
Copy link
Contributor

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/client.py", line 127, in get_job_status
  File "build/bdist.linux-x86_64/egg/gearman/client.py", line 141, in get_job_statuses
  File "build/bdist.linux-x86_64/egg/gearman/client.py", line 158, in wait_until_job_statuses_received
  File "build/bdist.linux-x86_64/egg/gearman/connection_manager.py", line 194, in poll_connections_until_stopped
  File "build/bdist.linux-x86_64/egg/gearman/connection_manager.py", line 160, in handle_connection_activity
  File "build/bdist.linux-x86_64/egg/gearman/connection_manager.py", line 218, in handle_read
  File "build/bdist.linux-x86_64/egg/gearman/command_handler.py", line 39, in fetch_commands
  File "build/bdist.linux-x86_64/egg/gearman/command_handler.py", line 65, in recv_command
  File "build/bdist.linux-x86_64/egg/gearman/client_handler.py", line 142, in recv_status_res
  File "build/bdist.linux-x86_64/egg/gearman/client_handler.py", line 57, in _assert_request_state
gearman.errors.InvalidClientState: Expected handle (H:dell:333) to be in state 'CREATED', got 'COMPLETE'
@mtai
Copy link

mtai commented Oct 26, 2010

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

@JustinAzoff
Copy link
Contributor Author

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..

@mtai
Copy link

mtai commented Oct 28, 2010

K, I'll try to submit a patch today

@mtai
Copy link

mtai commented Oct 28, 2010

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?

@JustinAzoff
Copy link
Contributor Author

works great now :-)

@mtai
Copy link

mtai commented Jan 11, 2011

Closed with python-gearman 2.0.2

Thanks for the bug report!

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants