Expand description
Helper structures and methods for Task
Structs§
- Task
Progress - In-progress task, with dispatch metadata
- Task
Report - Completed task, with its processing status and report messages
Enums§
- NewTask
Message - Enum for all types of reported messages for a given Task, as per the
LaTeXMLconvention One of “invalid”, “fatal”, “error”, “warning” or “info” - Task
Message - Enum for all types of reported messages for a given Task, as per the
LaTeXMLconvention One of “invalid”, “fatal”, “error”, “warning” or “info” - Task
Status - An enumeration of the expected task statuses. A small value type (every variant is a unit or a
single
i32) that round-trips throughi32viaTaskStatus::raw/TaskStatus::from_raw, so it isCopy.
Statics§
- LOADING_
LINE_ REGEX - “(Loading… file” message regex
Functions§
- entry_
document_ name - The short document name shown in reports and used for download filenames — an entry path’s
basename without its directory or extension (e.g.
/data/…/0811.0417/0811.0417.zip→0811.0417). Falls back to the trimmed entry when the path doesn’t match the…/name.extshape. - generate_
report - Generates a
TaskReportfrom a result archive (.zip) of aCorTeXprocessing job, following theLaTeXMLmessaging conventions in itscortex.log. ReturnsNonewhen the archive is unreadable or empty (0-byte, truncated, non-zip, or nocortex.logentry): that is an infrastructure failure — the worker returned nothing usable — not a conversion verdict, so we do not fabricate a terminalFatal. The caller (sink) skips finalizing it, leaving the task in-flight for the lease reaper, which retries it and only dead-letters it (with acortex/never_completed_with_retriesmessage) afterMAX_DISPATCH_RETRIES— never a silent, unretried Fatal (KNOWN_ISSUES D-18). A readablecortex.logalways yieldsSome— a genuine verdict, even when it parses toFatal. - parse_
log - Parses a log string which follows the
LaTeXMLconvention (described at the Manual) - prepare_
input_ stream - Returns an open file handle to the task’s entry
- rand_
in_ range - Helper for generating a random i32 in a range, to avoid loading the rng crate + boilerplate
- random_
mark - Generate a random integer useful for temporary DB marks
- rerun_
mark - Random temporary task
statussentinel for themark_reruntwo-phase reset. - result_
archive_ path - The single source of truth for where a service’s result archive lives, given a task’s source
entry. The sink writes it here and the frontend reads it back from here — previously three call sites re-derived the same<entry-dir>/<service>.zipthree different ways (aPath::parentand two subtly-different regexes), so this collapses them into one. - utf_
truncate - Utility functions, until they find a better place