Skip to content

Instantly share code, notes, and snippets.

@julweber
Created December 11, 2014 16:13
Show Gist options
  • Save julweber/5612a8c7bb0d8cbec681 to your computer and use it in GitHub Desktop.
Save julweber/5612a8c7bb0d8cbec681 to your computer and use it in GitHub Desktop.
class ScheduleWorker
def create_reviews_for_orders
execute_task do
Order.active.each { |o| o.create_reviews! }
end
end
private
def execute_task
yield
rescue => err
# Honeybadger.notify err
raise err
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment