Skip to content

Commit

Permalink
Catch InterruptedException at a higher level
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Morabito committed Nov 11, 2008
1 parent 83b4f14 commit a42f970
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions server/lib/bdrb_thread_pool.rb
Expand Up @@ -54,10 +54,14 @@ def add_thread
Thread.current[:job_key] = nil
Thread.current[:persistent_job_id] = nil
while true
task = @work_queue.pop
Thread.current[:job_key] = task.job_key
Thread.current[:persistent_job_id] = task.persistent_job_id
block_result = run_task(task)
begin
task = @work_queue.pop
Thread.current[:job_key] = task.job_key
Thread.current[:persistent_job_id] = task.persistent_job_id
block_result = run_task(task)
rescue BackgrounDRb::InterruptedException
next
end
end
end
end
Expand Down

0 comments on commit a42f970

Please sign in to comment.