public async Task <IActionResult> DeleteBroadcast([Required] Guid operationId) { var broadcast = await _dashService.GetBroadcastAsync(operationId); if (broadcast == null) { return(NoContent()); } _log.Info("Delete broadcast", new { operationId = operationId }); await _buildRepository.DeleteAsync(operationId); await _dashService.DeleteBroadcastAsync(broadcast); return(Ok()); }
public async Task <IActionResult> DeleteBroadcast([Required] Guid operationId) { var broadcast = await _dynamicService.GetBroadcastAsync(operationId); if (broadcast == null) { return(NoContent()); } await _log.WriteInfoAsync(nameof(TransactionsController), nameof(DeleteBroadcast), new { operationId = operationId }.ToJson(), "Delete broadcast"); await _buildRepository.DeleteAsync(operationId); await _dynamicService.DeleteBroadcastAsync(broadcast); return(Ok()); }
public async Task InitAsync() { // restart any builds that didn't finish before the last shutdown foreach (Build build in await _buildRepo.GetAllAsync()) { Engine engine = await _engineRepo.GetAsync(build.EngineId); if (engine != null) { EngineRunner runner = CreateRunner(engine.Id); await runner.RestartUnfinishedBuildAsync(build, engine); } else { // orphaned build, so delete it await _buildRepo.DeleteAsync(build); } } _commitTimer.Start(_options.Value.EngineCommitFrequency); }