Expand description
Memory copies the pack did not take because it was down or did not know this seat.
ljos note writes the logbook line first, then a note atom to the
pack. When the pack is off, not answering, or answers 401, the fitted
copy waits here, one JSON line per copy, and the next note that reaches
the pack, ljos finish, or the next session start sends it. ljos doctor only counts it. A copy the pack would refuse is kept in the
memory slot with its label and leaves the queue. A line left from
before that rule is cut to what the pack takes on the next send, and
the original stays in the slot. A note that has to wait stays queued.
Later notes are still tried. The queue holds one entry per issue, text,
workspace, kind
and, for a lesson, the atoms it closes. The seat that queued the copy
stays on the row, so a later seat does not take it. 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 memory waiting for the pack.
- SetAside
- Bytes of the queue a rewrite moved to a file beside it rather than drop: complete lines that did not parse and a last line without its newline.
Enums§
- Sent
- What one send says about a queued note.
Functions§
- busy_in
- The queue lock in
dirwhen another ljos holds it now, queueing or sending; tried without waiting for it. - drain_
in - Send each waiting note in
dirthroughsend, oldest first. A kept or refused note leaves the queue. A note that has to wait stays, and the drain still tries every later note. - 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
noteto the queue indir.falsewhen the same copy already waits there, including the atoms a lesson closes. - replace_
in - Replace the waiting memories in
dir. - set_
aside_ at - The damaged files a rewrite left in the state dir open as
fd, named belowdir, with their sizes, oldest day first. Each name is listed and stated throughfd, without following a link and without opening one, so name and size come from the same directory; a link or anything else that is not a regular file is left out, since a send never writes through one. - set_
aside_ in set_aside_atfordir, opened the way every state-log open is: a link in place ofdiris refused and lists nothing.- state_
dir - The state dir that holds the queue:
$XDG_STATE_HOME/ljos, else~/.local/state/ljos. - tidy_in
- Fit the waiting memories in
dirwithfitand set aside the bytes that are not a memory, rewriting the queue only when either changes it. Reading and rewriting under one lock keeps a note queued between them.