diff options
| author | Roy <Roy.mail.net@gmail.com> | 2023-07-20 20:52:11 +0300 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2023-07-20 20:52:11 +0300 |
| commit | 305a8e79c4b80f0c8578605ceff9514dd04d99d7 (patch) | |
| tree | d3cb844122fc225fccab04e131b237bf10a51250 /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | |
| parent | b85112b0931a41924fa6e6d2bf262b56314c0734 (diff) | |
| download | Tango-305a8e79c4b80f0c8578605ceff9514dd04d99d7.tar.gz Tango-305a8e79c4b80f0c8578605ceff9514dd04d99d7.zip | |
JOB RESUME BASICS
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 7b4ce4abc..0112f944d 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -3248,10 +3248,21 @@ namespace Tango.Integration.Operation return; } + double resumePreProgress = 0; + + if (config.ResumeConfig != null) + { + resumePreProgress = config.ResumeConfig.GlobalStartPosition; + request.FirstUnitStartPosition = config.ResumeConfig.FirstUnitStartPosition; + request.JobTicket.NumberOfUnits = (uint)Math.Max(config.ResumeConfig.RemainingUnits, 1); + } + SendContinuousRequest<JobRequest, JobResponse>(request, new TransportContinuousRequestConfig() { Timeout = TimeSpan.FromSeconds(10), ContinuousTimeout = TimeSpan.FromSeconds(10), ShouldLog = true }).Subscribe((response) => { if (!completed) { + response.Message.Status.Progress += resumePreProgress; + handler.RaiseStatusReceived(response.Message.Status); _last_job_status = handler.Status; |
