public async Task Process(SlackAction payload) { if (Guid.TryParse(payload.Value, out var deploymentId)) { var deployment = await _deploymentService.GetDeployment(deploymentId); await _deploymentQueueService.EnqueueDeployment(deployment, TimeSpan.FromSeconds(5)); } }
public async Task <ActionResult> ResendDeploymentNotification( [FromForm(Name = "deploymentId")] Guid deploymentId ) { var deployment = await _deploymentService.GetDeployment(deploymentId); await _deploymentNotificationService.CreateNotification(deployment); return(Ok()); }
public async Task <ActionResult> AddEntryToQueue([FromBody] DeploymentQueueEntry entry) { var deployment = await _deploymentService.GetDeployment(entry.DeploymentId); await _deploymentQueueService.EnqueueDeployment( deployment, TimeSpan.FromSeconds(entry.Delay ?? 0), entry.Force ); return(StatusCode(StatusCodes.Status201Created)); }