Class: Nomad::System

Inherits:
Request show all
Defined in:
lib/nomad/api/system.rb

Instance Attribute Summary

Attributes inherited from Request

#client

Instance Method Summary collapse

Methods inherited from Request

#initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Nomad::Request

Instance Method Details

#gc(**options) ⇒ true

Initiates garbage collection of jobs, evaluations, allocations, and nodes. This is an async operation that always returns true, unless an error is encountered when communicating with the Nomad API.

Examples:

Nomad.system.gc #=> true

Parameters:

  • [String] (Hash)

    a customizable set of options

Returns:

  • (true)


25
26
27
28
# File 'lib/nomad/api/system.rb', line 25

def gc(**options)
  client.put("/v1/system/gc", options)
  return true
end

#reconcile_summaries(**options) ⇒ true

Reconciles the summaries of all registered jobs.

Examples:

Nomad.system.reconcile_summaries #=> true

Parameters:

  • [String] (Hash)

    a customizable set of options

Returns:

  • (true)


39
40
41
42
# File 'lib/nomad/api/system.rb', line 39

def reconcile_summaries(**options)
  client.put("/v1/system/reconcile/summaries", options)
  return true
end