lib/zold/node/front.rb in zold-0.16.15 vs lib/zold/node/front.rb in zold-0.16.16
- old
+ new
@@ -201,10 +201,10 @@
GetProcessMem.new.bytes.to_i
end,
platform: RUBY_PLATFORM,
load: settings.zache.get(:load, lifetime: 5 * 60) do
require 'usagewatch_ext'
- Usagewatch.uw_load.to_f
+ Object.const_defined?('Usagewatch') ? Usagewatch.uw_load.to_f : 0.0
end,
threads: "#{Thread.list.select { |t| t.status == 'run' }.count}/#{Thread.list.count}",
wallets: total_wallets,
remotes: all_remotes.count,
nscore: all_remotes.map { |r| r[:score] }.inject(&:+) || 0,