OxL Справочник OxL
РусскийEnglish

data DlqEntry

A dead letter: a tail step failed (step, the error as text).

Example:

oxl✓ проверяется в CI
@error data Rejected { why: str }

fn moderate(n: i32) -> i32 | Rejected {
  if n % 2 == 1 { fail Rejected{ why: "odd" } }
  n
}

pipeline photo(n: i32) -> i32 {
  respond it
  -> moderate
  -> moderate
}

fn main() io, net, time, db {
  let _ = photo(3)
  sleep(300ms)
  for e in std.saga.dlqList("main.photo") {
    print("{e.pipe}: {e.step}: {e.error}")
  }
}
Вывод
main.photo: 2: moderate: Rejected{why: "odd"}
pub(api) data DlqEntry

С версии. 1.0.0-beta

Поля

pub(api) pipe: str

The qualified name of the pipeline.

pub(api) step: str

The step that failed, as number: label.

pub(api) error: str

The error as text.

pub(api) at: i64

When the entry was made, in milliseconds since the Unix epoch.

Определено в: std/saga/saga.oxl:1148

См. также