Method: Redwood::Index#fancy_lock_error_message_for
- Defined in:
- lib/sup/index.rb
#fancy_lock_error_message_for(e) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/sup/index.rb', line 69 def e secs = Time.now - e.mtime mins = secs.to_i / 60 time = if mins == 0 "#{secs.to_i} seconds" else "#{mins} minutes" end "Error: the sup index is locked by another process! User '\#{e.user}' on\nhost '\#{e.host}' is running \#{e.pname} with pid \#{e.pid}. The process was alive\nas of \#{time} ago.\n" end |