Class: Etl::Integrations::Protocol::Stream

Inherits:
ProtocolModel
  • Object
show all
Defined in:
lib/etl/integrations/protocol/protocol.rb

Instance Method Summary collapse

Methods inherited from ProtocolModel

from_json

Methods included from Core::Utils

#build_catalog, #build_stream, #convert_to_json_schema, #create_log_message, #extract_data, #handle_exception, #keys_to_symbols, #logger, #map_type_to_json_schema, #success?

Instance Method Details

#rate_limit_unit_secondsObject



132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/etl/integrations/protocol/protocol.rb', line 132

def rate_limit_unit_seconds
  case request_rate_limit_unit
  when "minute"
    60 # Seconds in a minute
  when "hour"
    3600 # Seconds in an hour
  when "day"
    86_400 # Seconds in a day
  else
    1 # Default case, consider as seconds or handle as error
  end
end