Sfoglia il codice sorgente

Reload check state before updating

Andrew Kane 7 anni fa
parent
commit
46b968560f
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      lib/blazer.rb

+ 1 - 0
lib/blazer.rb

@@ -129,6 +129,7 @@ module Blazer
           break
         end
       end
+      check.reload # in case state has changed since job started
       check.update_state(result)
       # TODO use proper logfmt
       Rails.logger.info "[blazer check] query=#{check.query.name} state=#{check.state} rows=#{result.rows.try(:size)} error=#{result.error}"