Open MerrionComputing opened 3 years ago
Per this blog
public static async Task<string> ScheduleManyInstances( IDurableOrchestrationClient client, string orchestrationName, int count, ILogger log) { log.LogWarning($"Scheduling {count} orchestration(s)..."); DateTime utcNow = DateTime.UtcNow; string prefix = utcNow.ToString("yyyyMMdd-hhmmss"); await Enumerable.Range(0, count).ParallelForEachAsync(200, i => { string instanceId = $"{prefix}-{i:X16}"; return client.StartNewAsync(orchestrationName, instanceId); }); log.LogWarning($"All {count} orchestrations were scheduled successfully!"); return prefix; }
Rather than the existing naive parallelism.
Per this blog
Rather than the existing naive parallelism.