public void Start(string currentOperation = null) { _record.CurrentOperation = currentOperation ?? _record.CurrentOperation; _record.StartTime = DateTime.UtcNow; _record.State = TimelineRecordState.InProgress; _jobServerQueue.QueueTimelineRecordUpdate(_mainTimelineId, _record); }
public void Start(string currentOperation = null, TimeSpan?timeout = null) { _record.CurrentOperation = currentOperation ?? _record.CurrentOperation; _record.StartTime = DateTime.UtcNow; _record.State = TimelineRecordState.InProgress; _jobServerQueue.QueueTimelineRecordUpdate(_mainTimelineId, _record); if (timeout != null) { _cancellationTokenSource.CancelAfter(timeout.Value); } //Section this.Section($"Starting: {_record.Name}"); }
public void Start(string currentOperation = null) { _logger = HostContext.CreateService <IPagingLogger>(); _logger.Setup(_mainTimelineId, _record.Id); _record.CurrentOperation = currentOperation ?? _record.CurrentOperation; _record.StartTime = DateTime.UtcNow; _record.State = TimelineRecordState.InProgress; _jobServerQueue.QueueTimelineRecordUpdate(_mainTimelineId, _record); //Section this.Section($"Starting: {_record.Name}"); }
public void Start(string currentOperation = null) { _record.CurrentOperation = currentOperation ?? _record.CurrentOperation; _record.StartTime = DateTime.UtcNow; _record.State = TimelineRecordState.InProgress; _jobServerQueue.QueueTimelineRecordUpdate(_mainTimelineId, _record); if (_disableLogUploads) { var buildLogsJobFolder = Path.Combine(_buildLogsFolderPath, _mainTimelineId.ToString()); Directory.CreateDirectory(buildLogsJobFolder); _buildLogsFile = Path.Combine(buildLogsJobFolder, $"{_record.Name}-{_record.Id.ToString()}.log"); _buildLogsData = new FileStream(_buildLogsFile, FileMode.CreateNew); _buildLogsWriter = new StreamWriter(_buildLogsData, System.Text.Encoding.UTF8); _logger.Write(StringUtil.Loc("BuildLogsMessage", _buildLogsFile)); } }
public void Start(string currentOperation = null) { _logger = HostContext.CreateService <IPagingLogger>(); _logger.Setup(_mainTimelineId, _record.Id); _record.CurrentOperation = currentOperation ?? _record.CurrentOperation; _record.StartTime = DateTime.UtcNow; _record.State = TimelineRecordState.InProgress; _jobServerQueue.QueueTimelineRecordUpdate(_mainTimelineId, _record); if (_timeout.TotalMilliseconds <= 0 || _timeout.TotalMilliseconds >= Int32.MaxValue) { _timeout = Timeout.InfiniteTimeSpan; } _timeoutTokenSource?.CancelAfter(_timeout); //Section this.Section($"Starting: {_record.Name}"); }