Skip to content
Snippets Groups Projects
Verified Commit 808ad123 authored by Matija Čupić's avatar Matija Čupić
Browse files

Log billing state changes in CheckGcpProjectBillingWorker

parent 02154350
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -74,7 +74,20 @@ class CheckGcpProjectBillingWorker
)
end
 
def log_transition(previous_state, current_state)
state_message = if previous_state.nil? && !current_state
"no_billing"
elsif previous_state.nil? && current_state
"with_billing"
elsif !previous_state && current_state
"billing_configured"
end
Rails.logger.info "#{self.class}: state: #{state_message}"
end
def update_billing_change_counter(previous_state, current_state)
log_transition(previous_state, current_state)
return unless !previous_state && current_state
 
billing_changed_counter.increment
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment