RetrySet

Event v151 → current #3

Emitted when retry configuration is set for a scheduled task.

View events on chain
Useful for: developersanalytics

The Big Picture

Confirmation that a task will retry on failure rather than being abandoned.

Use Cases

  • Confirm retry configuration
  • Track task resilience setup

From Chain Metadata

Set a retry configuration for some task.

Triggers

Preconditions

  • Task exists
  • set_retry call succeeded

Effects

Storage Modified

Postconditions

  • RetryConfig stored for the task

Side Effects

  • Failed executions will now trigger retries

Event Data

#NameTypeDescription
0
task
(u32, u32) TaskAddress<BlockNumberFor<T>>Task address as (block_number, index) tuple
1
id
Option Option<TaskName>Optional 32-byte task name (None for anonymous tasks)
2
period
u32 BlockNumberFor<T>Number of blocks between retry attempts
3
retries
u8 Maximum number of retry attempts allowed

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 RetrySet events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Scheduler.RetrySet.get(block.hash);
  for (const evt of events) {
    console.log("RetrySet:", evt.payload);
  }
});

Runtime Info

Pallet Index
15
Event Index
3
First Version
v151
Current Version
v411