Class: Plutonium::Wizard::Session
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Plutonium::Wizard::Session
- Defined in:
- lib/plutonium/wizard/session.rb
Overview
ActiveRecord model backing the plutonium_wizard_sessions table.
Identity is the derived InstanceKey digest stored in instance_key; the
polymorphic owner/anchor/scope refs exist for listing and rebuilding context,
not for identity. At-rest encryption (the wizard's encrypt_data opt-in) is
applied by Plutonium::Wizard::Store::ActiveRecord as a self-describing envelope in the data
column, not statically here — so this model stays a plain schema mapping.
Constant Summary collapse
- COMPLETING_GRACE =
How long a row may sit in
completingbefore the sweep treats it as a CRASHED finalize and reaps it. A healthy finalize flips tocompleting, runsexecute, and completes/clears the row within seconds — butexecuteruns OUTSIDE the completion lock and does not bumpexpires_at, so a sweep firing mid-finalize must NOT cancel it (that would destroy the run's tracked records out from under the in-flightexecute, §6.2). The grace window distinguishes a finalize that is still running (recentupdated_at) from one that crashed (staleupdated_at). Generous on purpose. 15.minutes