2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
8 opts = Optimist::options do
9 banner 'Fail jobs that have state=="Running".'
12 'fail only jobs that started before the given time (or "reboot")',
16 ENV["RAILS_ENV"] = ARGV[0] || ENV["RAILS_ENV"] || "development"
17 require File.dirname(__FILE__) + '/../config/boot'
18 require File.dirname(__FILE__) + '/../config/environment'
19 require Rails.root.join('lib/crunch_dispatch.rb')
21 CrunchDispatch.new.fail_jobs before: opts[:before]