lib/barnyard_harvester/redis.rb in barnyard_harvester-0.0.5 vs lib/barnyard_harvester/redis.rb in barnyard_harvester-0.0.7
- old
+ new
@@ -3,14 +3,10 @@
require "json"
require "resque"
module BarnyardHarvester
- class HarvesterLogs
- @queue = :logs_harvester
- end
-
class Barn
def initialize(args)
@crop_number = args.fetch(:crop_number) { raise "You must provide :crop_number" }
@@ -18,26 +14,16 @@
@debug = args.fetch(:debug) { false }
@log = args.fetch(:logger) { Logger.new(STDOUT) }
@redis_settings.delete(:db)
- Resque.redis = Redis.new(@redis_settings)
+ #Resque.redis = Redis.new(@redis_settings)
# This sets the database number for redis to store the cached data
@redis_settings[:db] = args[:crop_number]
# Connect to Redis
@redis = Redis.new(@redis_settings)
-
- end
-
- def log_run(harvester_uuid, crop_number, began_at, ended_at, source_count, change_count, add_count, delete_count)
-
- begin
- Resque.enqueue(HarvesterLogs, Time.now, harvester_uuid, crop_number, began_at, ended_at, source_count, change_count, add_count, delete_count)
- rescue Exception => e
- logger.fatal "#{self.class} Fail in Resque.enqueue of HarvesterLogs. #{e.backtrace}"
- end
end
def delete(primary_key)
check_key primary_key
\ No newline at end of file