AgendaIncomplete

Event v301 → current #9

Emitted when not all scheduled tasks could be processed in a block .

View events on chain
Useful for: developersanalytics

The Big Picture

Warning condition - the scheduler fell behind and some tasks were deferred.

Use Cases

  • Monitor scheduling throughput
  • Detect block congestion

From Chain Metadata

Agenda is incomplete from `when`.

Triggers

Preconditions

  • Block processing hit weight limit
  • Remaining tasks exist

Effects

Postconditions

  • IncompleteSince storage set to this block

Side Effects

  • Some scheduled tasks deferred

Event Data

#NameTypeDescription
0
when
u32 Block number where agenda processing was incomplete

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Subscribe to AgendaIncomplete events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("Scheduler") &&
      event.method === "AgendaIncomplete"
    )
    .forEach(({ event }) => {
      console.log("AgendaIncomplete:", event.data.toHuman());
    });
});

Runtime Info

Pallet Index
15
Event Index
9
First Version
v301
Current Version
v393