Permalink
Browse files

Make sure lock is removed after a deployment.

  • Loading branch information...
1 parent 4390ce3 commit 9a03d48c8ff9e369416acc1179143dc033ece7e8 @jcoglan jcoglan committed Jul 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/helium/web_helpers.rb
View
4 lib/helium/web_helpers.rb
@@ -44,9 +44,9 @@ def with_lock(&block)
lockfile = File.join(app_directory, LOCK)
File.open(lockfile, 'w') { |f| f.write(Time.now.to_s) }
at_exit { File.delete(lockfile) if File.exists?(lockfile) }
- result = block.call
+ block.call
+ ensure
File.delete(lockfile) if File.exists?(lockfile)
- result
end
# Generic handler for displaying editable files requested using GET.

0 comments on commit 9a03d48

Please sign in to comment.