Skip to content

filmopen_jobs

Generated by scripts/package_digest.py; regenerate, never edit.

Application-owned jobs, persistence and scheduling, independent of the film and its screens.

pure Dart. 14 files, 1,617 lines under lib/; 106 tests in 20 files. Barrel: lib/filmopen_jobs.dart.

Nothing of FilmOpen.

filmopen_app, filmopen_cloud, filmopen_drive, filmopen_forms, filmopen_insertion, filmopen_insertion_ui, filmopen_jobs_ui, filmopen_plugin_host, filmopen_render, filmopen_render_ui, filmopen_sharing, filmopen_state, filmopen_sync

What the barrel exports, file by file. A name is class, enum, mixin, extension, typedef, a top-level function, getter, setter or variable; under a class, its public constructors, fields, getters, setters and methods.

lib/src/job_api.dart — without copyJobData

Section titled “lib/src/job_api.dart — without copyJobData”
  • enum JobPhase — The complete set of marks a screen draws (overview §4.1).
    • values: queued, working, waiting, needsAttention, done, failed, cancelled
  • class JobAction — An extensible command: screens send it back without interpreting policy.
    • const JobAction(this.code)
    • final String code
    • static const stop
    • static const resume
    • static const retry
    • static const attachAgain
    • static const signIn
    • static const dismiss
    • static const resumeAnyway
  • class JobView — Everything a widget may know about a job; no persistence or retry details.
    • JobView({required this.id, required this.kind, required this.phase, required this.stateCode, Map<String, String> stateArgs = const {}, this.progres…
    • final String id
    • final String kind
    • final JobPhase phase
    • final String stateCode
    • final Map<String, String> stateArgs
    • final double? progress
    • final Set<JobAction> actions
    • final String? placeKey
    • final String? reference
    • final String? previewPath
    • final String? displayName
  • typedef typedef JobReport — A diagnostic: a stable code; for a failure the error’s type and message ([describeJobError]), for an event the values it worked on.
  • function String describeJobError(Object error) — The error as a report carries it: its runtime type, then its whole text, the type said once.
  • typedef typedef JobViews — A screen subscribes to snapshots, without observing an execution record.
  • enum JobPersistence — Persistence is chosen by the owner of the request, never by a widget.
    • values: session, durable
  • class JobRequest — Opaque execution data.
    • JobRequest({required this.kind, required this.lane, required Map<String, Object?> payload, this.projectKey, this.placeKey, this.persistence = JobPe…
    • final String kind
    • final String lane
    • final String? projectKey
    • final String? placeKey
    • final JobPersistence persistence
    • final JobHold? hold
    • Map<String, Object?> get payload
  • class JobHold — A policy hold carries its explanation and the commands that can lift it.
    • JobHold(this.code, {Iterable<JobAction> actions = const [JobAction.resume, JobAction.stop]})
    • final String code
    • final Set<JobAction> actions
  • class JobCheckpoint — A runner’s next durable intent and explicitly selected, safe view fields.
    • JobCheckpoint({required this.stateCode, Map<String, Object?>? payload, this.phase = JobPhase.working, Map<String, String> stateArgs = const {}, thi…
    • final String stateCode
    • final JobPhase phase
    • Map<String, Object?>? get payload
    • final Map<String, String> stateArgs
    • final double? progress
    • final Set<JobAction> actions
    • final String? reference
    • final String? previewPath
    • final String? displayName
  • class JobResult — An attempt’s result.
    • JobResult.done({this.reference, this.previewPath, this.displayName})
    • JobResult.waiting(this.code, {Iterable<JobAction> actions = const [JobAction.stop]})
    • JobResult.needsAttention(this.code, {Iterable<JobAction> actions = const [JobAction.retry, JobAction.dismiss], this.displayName}) — A result the person must act on; [displayName] names the file it is about, where there is one.
    • JobResult.failed(this.code)
    • JobResult.retry(this.code, {Duration delay = const Duration(seconds: 5)})
    • JobResult.cancelled()
    • final JobPhase phase
    • final String code
    • final Set<JobAction> actions
    • final Duration? retryDelay
    • final String? reference
    • final String? previewPath
    • final String? displayName
  • class JobRun — One attempt, with a memory-only binding and a cancellation intent.
    • String get id
    • int get seq
    • Map<String, Object?> get payload
    • Object? get binding
    • bool get interrupted
    • JobAction? get requestedAction
    • bool get cancelRequested
    • Future<void> get whenCancelled
    • Future<void> checkpoint(JobCheckpoint next)
    • Future<T> effect<T>(JobCheckpoint intent, Future<T> Function() perform) — Persist intent before an effect; a failed checkpoint performs no effect.
  • typedef typedef JobRunner — Registered per kind, independently of the journal’s private schema.
  • typedef typedef BindJob — Reconstructs bindings for an explicitly activated project.
  • class JobUnavailable — A refusal named by its code: a job view shows the code, never an underlying store’s message.
    • const JobUnavailable(this.code, [this.detail])
    • final String code
    • final String? detail — What the log needs to find the cause, such as the refused payload key’s name; never a value.
  • class JobActionAck — An acknowledgement means the control intent was durably accepted.
    • const JobActionAck(this.accepted, this.code)
    • final bool accepted
    • final String code
  • class JobEngine — Application-owned execution.
    • factory JobEngine({String? directory, DateTime Function()? now, bool autoTick = true, Map<String, int> capacities = const {}, JobReport? onJournalP… — Creates an inert engine whose exact capacities override the longest trailing-star prefix.
    • void register(String kind, JobRunner runner, {JobRunner? cancel, bool interruptible = false}) — [cancel] reconciles a stopped, previously started job under its execution claim.
    • Future<String> submit(JobRequest request, {Object? binding}) — Returns the accepted job id after its queued commit even if scheduling fails.
    • Future<void> restore(String? projectKey, {required BindJob bind})
    • List<JobView> get snapshot
    • Stream<List<JobView>> get views
    • Future<JobActionAck> act(String id, JobAction action)
    • void holdLane(String lane, JobHold hold)
    • void releaseLane(String lane)
    • Future<void> tick()
    • Future<void> close({Duration grace = const Duration(seconds: 10)})

lib/src/job_record.dart — only refuseCredentialKeys

Section titled “lib/src/job_record.dart — only refuseCredentialKeys”
  • function void refuseCredentialKeys(Map payload) — Refuse credential-shaped payload keys without inspecting record fields.
  • class Producer — A producer owns opening its outputs.
    • String get kind
    • Future<ProducerRun> start(Map<String, Object?> request, Object? context)
    • Future<ProducerRun> restore(Map<String, Object?> saved)
  • class ProducerRun — A producer survives its submitter; acknowledgement comes after safe ingest.
    • Stream<ProducerEvent> get events
    • Future<bool> cancel() — Asks the producer to stop, and answers whether it is over.
    • Map<String, Object?> toJson()
    • Future<void> acknowledge()
  • class ProducerEvent — State/progress followed by produced values or a code-only failure.
  • class ProducerState — A producer’s code is localized by its consumer, never server prose.
    • const ProducerState(this.code, {this.progress})
    • final String code
    • final double? progress
  • class Produced — A terminal successful answer, preserving the producer’s item order.
    • Produced(Iterable<ProducedValue> items)
    • final List<ProducedValue> items
  • class ProducerFailed — A terminal failure carries no exception, URL or server response.
    • const ProducerFailed(this.code, {this.detail})
    • final String code
    • final String? detail — The provider’s own sentence on why, already screened and cut by whoever kept it; carried, never read.
  • class ProducedValue — An output is media bytes or a text proposal; insertion decides its place.
  • class ProducedItem — Authorized bytes opened by the producer itself (overview §4).
    • const ProducedItem()
    • String get name
    • String get mime
    • int? get length
    • Map<String, Object?> get provenance
    • Stream<List<int>> open()
  • class ProducedText — A text proposal, not permission to replace the destination’s current text.
    • const ProducedText(this.text)
    • final String text

Files under lib/ the barrel does not reach; nothing outside the package may import them.

  • lib/src/execution_claim.dart: ExecutionClaim, ExecutionClaims, MemoryExecutionClaims, _MemoryClaim
  • lib/src/job_engine_impl.dart: JobEngineImpl, _Run
  • lib/src/journal.dart: Journal, MemoryJournal, JournalProblem
  • lib/src/journal_io.dart: FileJournal, JournalWrites, DiskJournalWrites, atomicWrite, FileLeaseStore
  • lib/src/journal_stub.dart: sessionJournal, sessionLeaseStore
  • lib/src/lease.dart: LeaseState, LeaseStore, MemoryLeaseStore, Lease
  • lib/src/persistence.dart: JobStorage, memoryStorage
  • lib/src/persistence_io.dart: createStorage, FileExecutionClaims, _FileClaim
  • lib/src/persistence_stub.dart: createStorage