Skip to content

Commit

Permalink
Slight refactor of interrupt logging, to help diagnose a deadlock.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Morabito committed Nov 11, 2008
1 parent e27a820 commit cf0fc65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/lib/bdrb_thread_pool.rb
Expand Up @@ -63,7 +63,7 @@ def add_thread
Thread.current[:persistent_job_id] = task.persistent_job_id
block_result = run_task(task)
rescue BackgrounDRb::InterruptedException
next
logger.info("BackgronDRb thread interrupted: #{Thread.current.inspect}")
end
end
end
Expand All @@ -82,9 +82,9 @@ def run_task task
result = master.send(task.job_method)
end
return result
rescue BackgrounDRb::InterruptedException
# Don't log, just return nil.
return nil
rescue BackgrounDRb::InterruptedException => e
# Don't log, just re-raise
raise e
rescue
logger.info($!.to_s)
logger.info($!.backtrace.join("\n"))
Expand Down

0 comments on commit cf0fc65

Please sign in to comment.