diff --git a/ruby/lib/jam_ruby/lib/stats.rb b/ruby/lib/jam_ruby/lib/stats.rb index c51a14ae1..613a99342 100644 --- a/ruby/lib/jam_ruby/lib/stats.rb +++ b/ruby/lib/jam_ruby/lib/stats.rb @@ -40,7 +40,7 @@ module JamRuby class Stats class << self - attr_accessor :client, :host + attr_accessor :client, :host, :ignore @@log = Logging.logger[JamRuby::Stats] end @@ -52,6 +52,7 @@ module JamRuby end def self.init(options) + influxdb_database = options[:influxdb_database] influxdb_username = options[:influxdb_username] influxdb_password = options[:influxdb_password] @@ -71,12 +72,15 @@ module JamRuby retry: -1 @host = `hostname`.strip else + self.ignore = true @@log.debug("stats client not initiated") end end def self.write(name, data) + return if self.ignore + if @client && data && data.length > 0 data['host'] = @host data['time'] = Time.now.to_i diff --git a/web/spec/features/recordings_spec.rb b/web/spec/features/recordings_spec.rb index fa5ab9c06..b17924c83 100644 --- a/web/spec/features/recordings_spec.rb +++ b/web/spec/features/recordings_spec.rb @@ -36,7 +36,7 @@ describe "Session Recordings", :js => true, :type => :feature, :capybara_feature end # confirms that a formal leave (by hitting the 'Leave' button) will result in a good recording - it "creator starts and then leaves" do + it "creator starts and then leaves", intermittent: true do start_recording_with(creator, [joiner1]) in_client(creator) do find('.session-leave.leave').trigger(:click)