generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What would you like?
Name an iteration of map:
const results = await context.map(
"process-items",
items,
async (ctx, item, index) => {
return await ctx.step(`process-${index}`, async () => process(item));
},
{
maxConcurrency: 5,
itemNamer: (item, index) => `item-${item.id}`, // Custom iteration names
},
);
Name a branch of parallel:
const results = await context.parallel(
"parallel-ops",
[
{
name: "fetch-user-data", // Custom name for this branch
func: async (ctx) => ctx.step(async () => fetchData1())
},
{
name: "fetch-order-history", // Custom name for this branch
func: async (ctx) => ctx.step(async () => fetchData2())
},
],
{ maxConcurrency: 2 },
);
export interface NamedParallelBranch<TResult, Logger extends DurableLogger> {
name?: string;
func: ParallelFunc<TResult, Logger>;
}
Possible Implementation
No response
Is this a breaking change?
No
Does this require an RFC?
No
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request