lib/tunemygc/syncer.rb in tunemygc-1.0.4 vs lib/tunemygc/syncer.rb in tunemygc-1.0.6

- old
+ new

@@ -36,20 +36,24 @@ def sync_required?(snapshotter) return true if ENV['RUBY_GC_SYNC_ALWAYS'] snapshotter.unit_of_work end + def environment(snapshotter) + ENVIRONMENT.dup.push(snapshotter.stat_keys) + end + private def timeout(&block) Timeout.timeout(TIMEOUT + 1){ block.call } end def sync_with_tuner(snapshotter) snapshots = 0 # Fallback to Timeout if Net::HTTP read timeout fails snapshots = snapshotter.size TuneMyGc.log "Syncing #{snapshots} snapshots" - payload = [ENVIRONMENT] + payload = [environment(snapshotter)] debug = ENV["RUBY_GC_TUNE_DEBUG"] TuneMyGc.log "=== Snapshots ===" if debug while !snapshotter.empty? snapshot = snapshotter.deq TuneMyGc.log(snapshot) if debug \ No newline at end of file