Class: Xeno::TurnJob

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

Overview

One turn = one job. All correctness (claim, fencing, replay) lives in TurnRunner + the database; the queue only provides at-least-once delivery and retry backoff.

Instance Method Summary collapse

Instance Method Details

#perform(turn_id) ⇒ Object



11
12
13
14
# File 'app/jobs/xeno/turn_job.rb', line 11

def perform(turn_id)
  turn = Turn.find(turn_id)
  TurnRunner.new(turn).run
end