Skip to content

Commit

Permalink
Manager: Fix bulk upload ignoring processing failed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel committed Jul 6, 2024
1 parent af1092b commit 0885135
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ArcdpsLogManager/Controls/MultipleLogPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ private void UpdateDpsReportUploadStatus()

int finished = uploaded + uploadsFailed + processingFailed;
int totalRequested = queued + uploading + uploaded + uploadsFailed + processingFailed;
int missingUploads = notUploaded + uploadsFailed + processingFailed;
dpsReportUploadProgressBar.MaxValue = totalRequested > 0 ? totalRequested : 1;
dpsReportUploadProgressBar.Value = finished;
dpsReportUploadButton.Enabled = notUploaded + uploadsFailed + processingFailed > 0;
dpsReportUploadButton.Enabled = missingUploads > 0;
dpsReportCancelButton.Enabled = queued > 0;
dpsReportUploadButton.Text = $"Upload missing logs ({notUploaded + uploadsFailed})";
dpsReportUploadButton.Text = $"Upload missing logs ({missingUploads})";
dpsReportNotUploadedLabel.Text = notUploaded.ToString();
dpsReportUploadingLabel.Text = (uploading + queued).ToString();
dpsReportUploadedLabel.Text = uploaded.ToString();
Expand Down Expand Up @@ -154,7 +155,7 @@ public MultipleLogPanel(LogCache logCache, ApiData apiData, LogDataProcessor log
foreach (var log in logData)
{
var state = log.DpsReportEIUpload.UploadState;
if (state == UploadState.NotUploaded || state == UploadState.UploadError)
if (state is UploadState.NotUploaded or UploadState.UploadError or UploadState.ProcessingError)
{
uploadProcessor.ScheduleDpsReportEIUpload(log);
}
Expand Down

0 comments on commit 0885135

Please sign in to comment.