diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-01-12 15:56:50 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-01-12 15:56:50 +0200 |
| commit | 9949e351e152a929da696ef2f0a1f8b1668e83fa (patch) | |
| tree | 40212bc488ea64cbaf137455c6a2280333c997dc /Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs | |
| parent | 9016d57f876a70952dda4419d68b568b586ef0ec (diff) | |
| download | Tango-9949e351e152a929da696ef2f0a1f8b1668e83fa.tar.gz Tango-9949e351e152a929da696ef2f0a1f8b1668e83fa.zip | |
Merged Beta+ fixes to master.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs index 7b3ed0612..d4a16a7e3 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs @@ -240,6 +240,12 @@ namespace Tango.Integration.Operation /// </summary> internal void RaiseCompleted() { + InvalidateJobProgress(new JobStatus() + { + Progress = Status.TotalProgress, + CurrentSegmentIndex = 0, + }); + LogManager.Log($"Job completed at position {Status.Progress}/{Status.TotalProgress}..."); Status.Segments.Last().Completed = true; Status.RemainingUnits = 0; @@ -284,14 +290,17 @@ namespace Tango.Integration.Operation { bool invalidProgress = false; - if (s.Progress <= PROGRESS_REPORT_RANGE_METERS || s.Progress >= Status.TotalProgress - PROGRESS_REPORT_RANGE_METERS) - { - LogManager.Log($"Updating job progress {s.Progress}/{Status.TotalProgress}..."); - } - else if (!loggedContinueMessage) + if (_last_progress != s.Progress) { - loggedContinueMessage = true; - LogManager.Log($"Progress logging will continue {PROGRESS_REPORT_RANGE_METERS} meters before completion..."); + if (s.Progress <= PROGRESS_REPORT_RANGE_METERS || s.Progress >= Status.TotalProgress - PROGRESS_REPORT_RANGE_METERS) + { + LogManager.Log($"Updating job progress {s.Progress}/{Status.TotalProgress}..."); + } + else if (!loggedContinueMessage) + { + loggedContinueMessage = true; + LogManager.Log($"Progress logging will continue {PROGRESS_REPORT_RANGE_METERS} meters before completion..."); + } } if (s.Progress < 0) |
