Commit 536c7c14 authored by gubala's avatar gubala

more pometheus debugs

parent b19de188
Pipeline #10 skipped
......@@ -45,21 +45,22 @@ class User < ActiveRecord::Base
t = Time.now
begin
GFTP::Exists.new.exists "/people/#{user.login}/", user.proxy do |test|
logger.info "ZEUS DIR CHECK: #{test} (the test took: #{Time.now - t})"
Rails.logger.info "ZEUS DIR CHECK: #{test} (the test took: #{Time.now - t})"
user.zeus_enabled = test
end
rescue
logger.info "ZEUS DIR CHECK: false (the test took: #{Time.now - t})"
Rails.logger.info "ZEUS DIR CHECK: false (the test took: #{Time.now - t})"
user.zeus_enabled = false
end
begin
GFTP::Exists.new.exists "gsiftp://#{Plgdata::Application.config.prometheus_gridftp_host}/net/people/#{user.login}/", user.proxy do |test|
logger.info "PROM DIR CHECK: #{test} (the test took: #{Time.now - t})"
Rails.logger.info "PROM DIR CHECK: #{test} (the test took: #{Time.now - t})"
user.prometheus_enabled = test
end
rescue
logger.info "PROM DIR CHECK: false (the test took: #{Time.now - t})"
rescue GFTP::GlobusError => error
Rails.logger.info "PROM DIR CHECK: false (the test took: #{Time.now - t})"
Rails.logger.warn error
user.prometheus_enabled = false
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment