/// <summary> /// Ensure the view name for the given job is present in the <see cref="AzureConstants.TableNames.ViewNameDate"/> table. /// </summary> private async Task PopulateViewName(JobId jobId, DateTimeOffset buildDate) { try { var entity = new ViewNameEntity(buildDate, AzureUtil.GetViewName(jobId)); var op = TableOperation.Insert(entity); await _viewNameDateTable.ExecuteAsync(op); } catch (StorageException ex) when(ex.RequestInformation.HttpStatusCode == 409) { // It's expected to get errors here because we're inserting duplicate data. All that matters is the // data is present in the table. } }
/// <summary> /// Ensure the view name for the given job is present in the <see cref="AzureConstants.TableNames.ViewNameDate"/> table. /// </summary> private async Task PopulateViewName(JobId jobId, DateTimeOffset buildDate) { try { var entity = new ViewNameEntity(buildDate, AzureUtil.GetViewName(jobId)); var op = TableOperation.Insert(entity); await _viewNameDateTable.ExecuteAsync(op); } catch (StorageException ex) when (ex.RequestInformation.HttpStatusCode == 409) { // It's expected to get errors here because we're inserting duplicate data. All that matters is the // data is present in the table. } }