Class: MonitorUnresponsiveNodeJob

Inherits:
ContainerBrokerBaseJob show all
Defined in:
app/jobs/monitor_unresponsive_node_job.rb

Constant Summary

Constants inherited from ContainerBrokerBaseJob

ContainerBrokerBaseJob::JOB_METRIC

Instance Method Summary collapse

Methods inherited from ContainerBrokerBaseJob

request_id_from_args

Instance Method Details

#perform(node:) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/jobs/monitor_unresponsive_node_job.rb', line 6

def perform(node:)
  node.run_with_lock_no_wait do
    node.runner_service(:node_availability).perform(node: node)

    Rails.logger.debug("Marking #{node} as available again")
    node.register_success
    node.available!

    RunTasksForAllExecutionTypesJob.perform_later
  end
rescue StandardError => e
  node.register_error("#{e.class}: #{e.message}")

  Rails.logger.info("#{node} still unresponsive")
end