ErrorsBackground work · rule
type.batch_context
Batch operation called outside an action.
Area 12, Background work; not declinable; the next step is usually the agent's.
Only an action starts a run, reads its progress or cancels it, keeping what it does in the action's transaction:
action sweep_shelf(page: ItemPage) -> BatchRun { return batches.each(from: items(page), each: item -> mark_seen(item))}/// How far a sweep has got, for a report.function shelf_report(shelf_run: BatchRun) -> BatchProgress { return batches.status(shelf_run)}
error A function can't call batches.status
--> main.jadpo:7:12
|7 | return batches.status(shelf_run) | ^^^^^^^^^^^^^^ outside an action
- reason
batches.statusreads a run the runtime keeps in the store an action writes, so only an action calls it.- next
- Call
batches.statusin an action (agent) - rule
- type.
batch_ context - help
- https://jadpo.
dev/docs/errors/type. batch_ context
Markdown for agents: /docs/errors/type.batch_context.md.Built from Jadpo main at aee2e8f.