PhoenixKit.Modules.Storage.AnnotationThumbnailJob (phoenix_kit v1.7.169)

Copy Markdown View Source

Background (re)generation of a file's baked annotated thumbnail.

Debounced: jobs are unique per file_uuid while still pending or running (scheduled / available / executing / retryable) and enqueued with a short delay, so a burst of annotation edits collapses into a single render. The job reads the current annotations at run time, so it always reflects the latest state.

Crucially, :completed is not a unique state: once a regen finishes, the next edit enqueues a fresh one. (Oban's default unique states include :completed, which would throttle regens to one per period per file and silently drop edits made inside that window — the symptom being "my new shape didn't show up until I drew another one.")

Summary

Functions

Enqueue a debounced annotated-thumbnail refresh for file_uuid.

Functions

enqueue(file_uuid)

Enqueue a debounced annotated-thumbnail refresh for file_uuid.

Best-effort: never raises (so it can't break the annotation-save path even if Oban isn't running). Returns :ok regardless.