5 opts = Trollop::options do
6 banner 'Fail jobs that have state=="Running".'
9 'fail only jobs that started before the given time (or "reboot")',
13 ENV["RAILS_ENV"] = ARGV[0] || ENV["RAILS_ENV"] || "development"
14 require File.dirname(__FILE__) + '/../config/boot'
15 require File.dirname(__FILE__) + '/../config/environment'
16 require Rails.root.join('lib/crunch_dispatch.rb')
18 CrunchDispatch.new.fail_jobs before: opts[:before]