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 BlockNumberFor<T>Block number where agenda processing was incomplete

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Subscribe to AgendaIncomplete events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Scheduler.AgendaIncomplete.get(block.hash);
  for (const evt of events) {
    console.log("AgendaIncomplete:", evt.payload);
  }
});

Runtime Info

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