lib/flydata/query_based_sync/client.rb in flydata-0.8.9 vs lib/flydata/query_based_sync/client.rb in flydata-0.8.9.11

- old
+ new

@@ -1,7 +1,8 @@ require 'thread' require 'flydata-core/logger' +require 'flydata/error_reporting' module Flydata module QueryBasedSync class Client @@ -11,17 +12,21 @@ DEFAULT_RETRY_INTERVAL = 30 # 1 minute # params # fetch_interval # resource_names - def initialize(context) + def initialize(context, with_rollbar=false) @context = context @resource_requester = self.class::RESOURCE_REQUESTER_CLASS.new(context) @response_handler = self.class::RESPONSE_HANDLER_CLASS.new(context) context.params.tap do |c| @fetch_interval = c.nil? ? DEFAULT_FETCH_INTERVAL : c[:fetch_interval] @retry_interval = c.nil? ? DEFAULT_RETRY_INTERVAL : c[:retry_interval] + end + + if with_rollbar + Flydata::RollbarHookSetup.new(get_logger).setup end end attr_reader :context attr_reader :resource_requester