class

Fluxion::State::Document

Inherits JSON::Serializable < Reference < Object

The persisted record of what a profile has already done.

Constants

LEGACY_SCHEMA_VERSION = 7

The last schema the Java implementation wrote. Files at or below this are read through the migration below rather than refused: someone upgrading should not have to reinstall everything they already have.

SCHEMA_VERSION = 8

Bumped when the shape changes. A file from a newer Fluxion is refused rather than misread.

Numbering continues from the Java implementation, which reached 7, so a machine that has run both never sees a version go backwards.

Constructors

new(profile_name : String, schema_version : Int32 = SCHEMA_VERSION, last_run_at : Time = Time.utc, fluxion_version : String = VERSION, items : Array(ItemRecord) = [] of ItemRecord, jobs : Array(JobRecord) = [] of JobRecord, next_job : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

any_recorded?
Source
find(step : String, key : String, type : String) : ItemRecord | Nil
Source
fluxion_version
Source
fluxion_version=(fluxion_version : String)
Source
forget_item(key : String, step : String | Nil = nil, type : String | Nil = nil) : Int32
Source
forget_job(name : String) : Bool
Source
items
Source
items=(items : Array(ItemRecord))
Source
job_completed?(name : String, fingerprint : String | Nil) : Bool
Source
jobs
Source
jobs=(jobs : Array(JobRecord))
Source
last_run_at
Source
last_run_at=(last_run_at : Time)
Source
next_job

Where a stopped run should pick up.

Source
next_job=(next_job : String | Nil)

Where a stopped run should pick up.

Source
profile_name
Source
profile_name=(profile_name : String)
Source
record(item : ItemRecord) : Nil
Source
record(job : JobRecord) : Nil
Source
schema_version
Source
schema_version=(schema_version : Int32)
Source