Skip to main content

Module note_queue

Module note_queue 

Source
Expand description

Memory copies of ljos note that the pack did not take.

ljos note writes the logbook line first, then a note atom to the pack. When the pack is off or not answering, the atom waits here, one JSON line per note, and the next note that reaches the pack, ljos finish, or ljos doctor sends it. A refusal is not queued: the pack would refuse it again. The queue holds one entry per issue and text, and packsetd answers an identical issue and text with the claim it already holds, so a resend after a lost answer stores nothing new.

Structs§

Drained
What a drain did.
Queued
One note waiting for the pack.

Enums§

Sent
What one send says about a queued note.

Functions§

drain_in
Send each waiting note in dir through send, oldest first. A kept or refused note leaves the queue; the first one that has to wait stops the drain, and it and every later note stay, in order.
drained_lines
The lines a drain prints: what went, what the pack refused, and what still waits. Empty when nothing was queued.
pending_in
The notes waiting in dir, oldest first.
push_in
Add note to the queue in dir. false when the same issue and text already wait there.
state_dir
The state dir that holds the queue: $XDG_STATE_HOME/ljos, else ~/.local/state/ljos.