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

Commit

Permalink
Merge pull request #55 from noamraph/master
Browse files Browse the repository at this point in the history
Don't remove entries from handle_to_request_map.
  • Loading branch information
yyejun committed Jan 9, 2014
2 parents 5f3d3e0 + 7deec9d commit deec7fc
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions gearman/client_handler.py
Expand Up @@ -54,10 +54,6 @@ def on_io_error(self):
def _register_request(self, current_request):
self.handle_to_request_map[current_request.job.handle] = current_request

def _unregister_request(self, current_request):
# De-allocate this request for all jobs
return self.handle_to_request_map.pop(current_request.job.handle, None)

##################################################################
## Gearman command callbacks with kwargs defined by protocol.py ##
##################################################################
Expand Down Expand Up @@ -122,7 +118,6 @@ def recv_work_complete(self, job_handle, data):

current_request.result = self.decode_data(data)
current_request.state = JOB_COMPLETE
self._unregister_request(current_request)

return True

Expand All @@ -132,7 +127,6 @@ def recv_work_fail(self, job_handle):
self._assert_request_state(current_request, JOB_CREATED)

current_request.state = JOB_FAILED
self._unregister_request(current_request)

return True

Expand Down Expand Up @@ -162,8 +156,4 @@ def recv_status_res(self, job_handle, known, running, numerator, denominator):
'time_received': time.time()
}

# If the server doesn't know about this request, we no longer need to track it
if not job_known:
self._unregister_request(current_request)

return True

0 comments on commit deec7fc

Please sign in to comment.