Skip to content

Commit

Permalink
#819 usagewatch off
Browse files Browse the repository at this point in the history
  • Loading branch information
davvd committed Nov 30, 2023
1 parent f9cd840 commit 9e18554
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/zold/node/front.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ class Front < Sinatra::Base
end,
platform: RUBY_PLATFORM,
load: settings.zache.get(:load, lifetime: settings.opts['no-cache'] ? 0 : 60) do
require 'usagewatch_ext'
Object.const_defined?('Usagewatch') ? Usagewatch.uw_load.to_f : 0.0
# doesn't work with Ruby 3.0+
# require 'usagewatch_ext'
# Object.const_defined?('Usagewatch') ? Usagewatch.uw_load.to_f : 0.0
0.0
end,
total_mem: total_mem,
threads: "#{Thread.list.select { |t| t.status == 'run' }.count}/#{Thread.list.count}",
Expand Down

0 comments on commit 9e18554

Please sign in to comment.