class ZuoraConnect::AppInstanceBase

def init

def init
  self.connect_user = 'Nobody'
  self.logitems = {}
  self.task_data = {}
  self.options = Hash.new
  self.logins = Hash.new
  self.api_version = "v2"
  self.attr_builder("timezone", ZuoraConnect.configuration.default_time_zone)
  self.attr_builder("locale", ZuoraConnect.configuration.default_locale)
  PaperTrail.whodunnit = "Backend" if defined?(PaperTrail)
  if defined?(ElasticAPM)
    ElasticAPM.set_user("Backend")
    ElasticAPM.set_tag(:app_instance, self.id) 
  end
  if INSTANCE_REFRESH_WINDOW > INSTANCE_REDIS_CACHE_PERIOD
    raise "The instance refresh window cannot be greater than the instance cache period"
  end
  self.apartment_switch(nil, false)
end