예제 #1
0
        public async Task <SearchResults <DeploymentEntity> > Get([FromQuery] DocumentQueryModel query)
        {
            SearchResults <DeploymentEntity> deployments = await _deploymentService.GetAsync(query);

            List <DeploymentEntity> laggingDeployments = deployments.Results.Where(d => d.Build.Status.Equals(BuildStatus.InProgress) && d.Build.Started.Value.AddMinutes(10) < DateTime.UtcNow).ToList();

            foreach (DeploymentEntity deployment in laggingDeployments)
            {
                await _pipelineService.UpdateDeploymentStatus(deployment.Build.Id, deployment.Org);
            }

            return(deployments);
        }
예제 #2
0
 public async Task <SearchResults <DeploymentEntity> > Get([FromQuery] DocumentQueryModel query)
 => await _deploymentService.GetAsync(query);
        public async Task GetAsync(DeployOptions options)
        {
            var deployments = await _service.GetAsync(options);

            Write(deployments, options.Pretty);
        }