Improved TaskRunner, changed config storage frmo YAML to DB
A viewable MIME type was not detected. Trying to display the file content as plain text.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'boot'))
require 'active_record'
require 'active_support'
require 'erb'
require 'yaml'
Time.zone_default = Time.__send__(:get_zone, 'UTC')
ActiveRecord::Base.time_zone_aware_attributes = true
ActiveRecord::Base.default_timezone = :utc
load 'retrospectiva/task_manager.rb'
manager = Retrospectiva::TaskManager.new
if ARGV.include?('tasks')
puts "Tasks: " + manager.tasks.map(&:name).inspect
elsif ARGV.include?('pending')
puts "Pending: " + manager.pending.map(&:name).inspect
else
manager.run
end |
|---|