Skip to content

Instantly share code, notes, and snippets.

@olkeene
Created March 17, 2009 09:45
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 olkeene/80428 to your computer and use it in GitHub Desktop.
Save olkeene/80428 to your computer and use it in GitHub Desktop.
namespace :datarm do
desc "Run Trip Wires"
task :run_trip_wires => :environment do |rake_task|
proceed(rake_task) do
TripWireEngine.proceed_all_active
end
end
desc 'Empty action for report. Requirements: REPORT_ID'
task :empty_report => :environment do |rake_task|
proceed(rake_task) do
ReportsEngine.new(ENV['REPORT_ID']).empty_report
end
end
def proceed(rake_task, &block)
begin
block.call
rescue Exception => e
LoggedExceptionRake.save_exception e, rake_task, ENV
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment