Class: Sidekiq::Mcp::Tools::ProcessSetTool
- Inherits:
-
Sidekiq::Mcp::Tool
- Object
- Sidekiq::Mcp::Tool
- Sidekiq::Mcp::Tools::ProcessSetTool
- Defined in:
- lib/sidekiq/mcp/tools/process_set_tool.rb
Instance Method Summary collapse
Methods inherited from Sidekiq::Mcp::Tool
arguments, #call, description, schema_to_json_schema, to_tool_definition
Instance Method Details
#perform ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/sidekiq/mcp/tools/process_set_tool.rb', line 16 def perform processes = Sidekiq::ProcessSet.new.map do |process| { identity: process["identity"], hostname: process["hostname"], pid: process["pid"], tag: process["tag"], concurrency: process["concurrency"], queues: process["queues"], busy: process["busy"], beat: process["beat"], quiet: process["quiet"], started_at: process["started_at"], labels: process["labels"], version: process["version"], rss_kb: process["rss"] } end { total_processes: processes.size, processes: processes }.to_json end |