Class: Xeno::SlackEventJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/xeno/slack_event_job.rb

Overview

Processes one verified Slack event off the webhook path. The endpoint acks inside Slack's 3-second window and hands the payload here; session work (DB writes, LLM turns via TurnJob) happens on the queue. Slack retry storms die at the event_id dedup row (claimed atomically with this enqueue); a session can never be double-opened by a retry — the thread's continuation token is unique among active sessions.

Instance Method Summary collapse

Instance Method Details

#perform(payload) ⇒ Object



13
14
15
16
17
18
# File 'app/jobs/xeno/slack_event_job.rb', line 13

def perform(payload)
  channel = Channels.registry[:slack]
  return unless channel

  channel.handle_event(payload)
end