Exemple #1
0
        /// <summary>
        /// Schedule batch jobs
        /// </summary>
        /// <param name="runtimeConfigGeneration"></param>
        /// <returns></returns>
        public async Task <Result> ScheduleBatch(RuntimeConfigGeneration runtimeConfigGeneration)
        {
            var flows = await GetByMode(Constants.InputMode_Batching).ConfigureAwait(false);

            Result result = null;

            foreach (var flow in flows)
            {
                var name = flow.Name;
                result = await runtimeConfigGeneration.GenerateRuntimeConfigs(name).ConfigureAwait(false);

                if (result.IsSuccess)
                {
                    result = await RestartJobsForFlow(name).ConfigureAwait(false);
                }
            }

            return(result ?? new SuccessResult("done"));
        }