Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorBenjamin Neff <benjamin@coding4coffee.ch>2022-07-23 18:58:09 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2022-07-24 18:17:51 +0300
commitb29675fead857cf6370d5ad70cac97f0d975ec3a (patch)
tree6f329710f1ada4f385ba594171995d77f9ba0a4a /app
parenteb1c57151183cfceb87c06fc67f3293d83d2cb47 (diff)
Remove error if there was no error anymore
also add pod uri when logging offline pods ... just having a bunch of "OFFLINE" log messages doesn't help at all.
Diffstat (limited to 'app')
-rw-r--r--app/models/pod.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/pod.rb b/app/models/pod.rb
index c64bf4ce2..08692f280 100644
--- a/app/models/pod.rb
+++ b/app/models/pod.rb
@@ -114,7 +114,7 @@ class Pod < ApplicationRecord
def update_from_result(result)
self.status = status_from_result(result)
update_offline_since
- logger.warn "OFFLINE #{result.failure_message}" if offline?
+ logger.warn "#{uri} OFFLINE: #{result.failure_message}" if offline?
attributes_from_result(result)
touch(:checked_at)
@@ -125,7 +125,7 @@ class Pod < ApplicationRecord
def attributes_from_result(result)
self.ssl ||= result.ssl
- self.error = result.failure_message[0..254] if result.error?
+ self.error = result.error? ? result.failure_message[0..254] : nil
self.software = result.software_version[0..254] if result.software_version.present?
self.response_time = result.rt
end