Skip to content

Commit

Permalink
Minor reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Nov 26, 2023
1 parent d63408f commit 41bfe6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/flipper/cloud/telemetry.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require "concurrent/map"
require "concurrent/timer_task"
require "concurrent/executor/fixed_thread_pool"
require "flipper/typecast"
require "flipper/cloud/telemetry/metric"
require "flipper/cloud/telemetry/metric_storage"
require "flipper/cloud/telemetry/submitter"
Expand Down Expand Up @@ -50,11 +52,9 @@ def self.instance_for(cloud_configuration)
def initialize(cloud_configuration)
@pid = $$
@cloud_configuration = cloud_configuration
self.submitter = ->(drained) {
Submitter.new(@cloud_configuration).call(drained)
}
self.interval = ENV.fetch("FLIPPER_TELEMETRY_INTERVAL", 60).to_f
self.shutdown_timeout = ENV.fetch("FLIPPER_TELEMETRY_SHUTDOWN_TIMEOUT", 5).to_f
self.submitter = ->(drained) { Submitter.new(@cloud_configuration).call(drained) }
start
at_exit { stop }
end
Expand Down

0 comments on commit 41bfe6c

Please sign in to comment.