Skip to main content

append

Function append 

Source
pub async fn append(path: &Path, msg: &Message) -> Result<(), Error>
Expand description

Append a single message as a JSON line to the NDJSON file.

Uses spawn_blocking + std::fs::OpenOptions directly to avoid the tokio::fs abstraction layer which can fail with “background task failed” when the runtime’s blocking thread pool is under pressure.