lib/broker.rb in broker-0.1.1 vs lib/broker.rb in broker-0.1.2
- old
+ new
@@ -1,19 +1,20 @@
require 'broker/version'
#require 'broker/session'
require 'yaml'
module Broker
- NAME = "Broker: Quickbase Data Intake"
+ NAME = "Broker"
DEFAULTS = {
secrets_path: 'config/secrets.yml',
tables_path: 'config/quickbase_tables.yml',
initializer: 'config/initializers/broker.rb',
poll_interval: 300,
queue: 'broker_queue',
processed_path: 'broker_processed',
+ failed_path: 'broker_failed',
file_ext: :csv,
enqueued: []
}
def self.load_config(dest)
@@ -94,15 +95,19 @@
def self.processed_path=(pa)
options[:processed_path] = pa
end
+ def self.failed_path=(pa)
+ options[:failed_path] = pa
+ end
+
def self.poll_interval=(val)
options[:poll_interval] = val
end
- def file_ext=(val)
- options[:file_ext] = val if [:csv, :tab].include? val
+ def self.file_ext=(val)
+ options[:file_ext] = val if [:csv, :txt].include? val
end
end
require 'broker/application'