Class: Collavre::UpdateMcpToolsJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- Collavre::UpdateMcpToolsJob
- Defined in:
- app/jobs/collavre/update_mcp_tools_job.rb
Overview
Re-derives a creative's MCP tool definitions from its description HTML. Runs off the request/save path (enqueued from Creative after_commit) so the Nokogiri parsing and tool upserts never block a synchronous save.
Instance Method Summary collapse
Instance Method Details
#perform(creative_id) ⇒ Object
10 11 12 13 14 15 |
# File 'app/jobs/collavre/update_mcp_tools_job.rb', line 10 def perform(creative_id) creative = Creative.find_by(id: creative_id) return unless creative McpService.new.update_from_creative(creative) end |