Пример #1
0
 public BuildCommand(BuildApplicationModel build, GetWaitingStepQueryResponse stepContainer, RunApplicationModel run, Func <string, CommandLogType, Task> onLog)
 {
     Build         = build;
     StepContainer = stepContainer;
     Run           = run;
     OnLog         = onLog;
 }
Пример #2
0
        private void SearchForNewStep()
        {
            Task.Run(async() => {
                using (var scope = _serviceProvider.CreateScope()) {
                    var mediator = scope.ServiceProvider.GetRequiredService <IMediator>();
                    _currentStep = await mediator.Send(new GetWaitingStepQuery(_currentBuildRun.Build.ID));

                    if (_currentStep == null)
                    {
                        _stateMachine.Fire(BuildRunnerTrigger.NoStepFound);
                    }
                    else
                    {
                        _stateMachine.Fire(BuildRunnerTrigger.FoundNewStep);
                    }
                }
            });
        }