ctx.loading.completeOne
Marks a chunk of work as completed to dynamically provide granular loading progress. Can only be used after ctx.loading.start
was called with itemsInQueue
.
- TypeScript
- JavaScript
- Python
await ctx.loading.start({
title: "Migrating users",
description: "Enabling edit button for selected users",
itemsInQueue: 100,
});
for (const user of users) {
migrateUser(user);
await ctx.loading.completeOne();
}
await ctx.loading.start({
title: "Migrating users",
description: "Enabling edit button for selected users",
itemsInQueue: 100,
});
for (const user of users) {
migrateUser(user);
await ctx.loading.completeOne();
}
await ctx.loading.start(
title="Migrating users",
description="Enabling edit button for selected users",
items_in_queue=100,
)
for user in users:
migrate_user(user)
await ctx.loading.complete_one()

- TypeScript
- JavaScript
- Python
Returns
null
Returns
null
Returns
None
Was this section useful?