Class: OllamaAgent::CLI::KernelHealthCommand

Inherits:
Thor
  • Object
show all
Defined in:
lib/ollama_agent/cli/health_command.rb

Overview

Thor subcommand group: ollama_agent kernel health.

Instance Method Summary collapse

Instance Method Details

#healthObject



14
15
16
17
18
19
20
21
# File 'lib/ollama_agent/cli/health_command.rb', line 14

def health
  root = expanded_root
  registry = Runtime::DatabaseRegistry.new(root_dir: root)
  blobs = Runtime::BlobStore.new(kernel_dir: registry.kernel_dir)
  payload = Runtime::KernelHealth.new(db_registry: registry, blob_store: blobs).check
  puts JSON.generate(symbolize_for_json(payload))
  exit(payload[:status] == :ok ? 0 : 1)
end