Skip to content

Commit

Permalink
Workers should keep_trying_to for check_in, but not for check_out
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Sep 4, 2009
1 parent 646eaf3 commit d629ec1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/cloud_crowd/worker.rb
Expand Up @@ -65,13 +65,18 @@ def fail_work_unit(exception)
# Check in with the central server. Let it know the condition of the work
# thread, the action and status we're processing, and our hostname and PID.
def check_in(thread_status)
@server["/worker"].put({
:name => @name,
:thread_status => thread_status
})
keep_trying_to "check in with central" do
@server["/worker"].put({
:name => @name,
:thread_status => thread_status
})
end
end

# Inform the central server that this worker is finished.
# Inform the central server that this worker is finished. This is the only
# remote method that doesn't retry on connection errors -- if the worker
# can't connect to the central server while it's trying to shutdown, it
# should close, regardless.
def check_out
@server["/worker"].put({
:name => @name,
Expand Down

0 comments on commit d629ec1

Please sign in to comment.