def collect

cswap-bend-cli@0.1.0.0 · daemon/collect.bend:68

import cswap-bend-cli@0.1.0.0/daemon/collect.bend as Collect
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase
import cswap-bend-cli@0.1.0.0/daemon/config.bend as Cfg
import cswap-bend-cli@0.1.0.0/daemon/gather.bend as G
import cswap-bend-cli@0.1.0.0/daemon/view.bend as V
import cswap-bend-cli@0.1.0.0/daemon/plan.bend as Plan

68# Fetch what is due, in two passes (the active account and one candidate; then
69# everyone when the active account is shaky), and answer the rows as they
70# stand.
71def collect(+ctx: SBase.Ctx, +es: List<&2, G.Ent>, +active: String, +rows0: Json.Json, +now: U32, +cfg: Cfg.Cfg) -> Act.of(Json.Json):
72  do ActM<Json.Json>:
73    rows1 : Json.Json <- fetch_pass(ctx, cfg, Plan.first_pass(es, V.usages_of(rows0, es, Some{active}, now), Some{active}, V.nat(now), V.pol_cfg(cfg)), Some{active}, now, rows0)
74    second_pass(ctx, es, active, rows1, rows0, now, cfg)

Uses (17)

Used by (1)