Skip to content
Browse files

Merge branch 'multi_jobs' into glyde_stable

  • Loading branch information...
2 parents 84c574c + a42f970 commit e27a820739d2e5c7c7b2c8c0cd2342751a86cf25 Seth Morabito committed Nov 10, 2008
Showing with 8 additions and 4 deletions.
  1. +8 −4 server/lib/bdrb_thread_pool.rb
View
12 server/lib/bdrb_thread_pool.rb
@@ -57,10 +57,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

0 comments on commit e27a820

Please sign in to comment.
Something went wrong with that request. Please try again.