Skip to content

Instantly share code, notes, and snippets.

@ujjain
Created May 4, 2016 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ujjain/8097742c0184a3b0ea137fcf28ac39b3 to your computer and use it in GitHub Desktop.
Save ujjain/8097742c0184a3b0ea137fcf28ac39b3 to your computer and use it in GitHub Desktop.
begin
timeout(config['deploy-timeout'].to_i) do
execute_and_log command
end
rescue Timeout::Error => e
log.error "#{@timeout_exception}"
raise e
end
ensure
Log4r::MDC.put 'stage', STAGE_POST_DEPLOY
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment