diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-05-14 14:56:21 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-05-14 14:56:21 +0300 |
| commit | 33b7badb8903408d72c3ec42d3198c5e4cef8fc1 (patch) | |
| tree | 937e1afe13b0f7e0e43117fbe5a13533fb3ec75e /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | |
| parent | 9aca4b69b22a08d01b12e358eb198f3fbe92ff2a (diff) | |
| download | Tango-33b7badb8903408d72c3ec42d3198c5e4cef8fc1.tar.gz Tango-33b7badb8903408d72c3ec42d3198c5e4cef8fc1.zip | |
TCC mobile design improvement.
Added keep alive work around for job parsing.
New catalog handling per RML on PPC.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index f8e632fa5..3f62cd301 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -1470,6 +1470,8 @@ namespace Tango.Integration.Operation LogManager.Log($"Job upload method is set to {JobUploadStrategy}..."); + var oldKeepAlive = UseKeepAlive; + if (JobUploadStrategy == JobUploadStrategy.JobDescriptionFile) { LogManager.Log("Generating job description file..."); @@ -1492,7 +1494,8 @@ namespace Tango.Integration.Operation var storage = CreateStorageManager(); //Suppress keep alive while job uploads. - storage.SuppressKeepAliveWhileFileUploads = true; + //storage.SuppressKeepAliveWhileFileUploads = true; + UseKeepAlive = false; //This is a work around for Shlomo not managing to keep alive while parsing the file. LogManager.Log("Getting storage drive information..."); var storageInfo = await storage.GetStorageDrive(); @@ -1518,6 +1521,7 @@ namespace Tango.Integration.Operation } catch (Exception ex) { + UseKeepAlive = oldKeepAlive; Status = MachineStatuses.ReadyToDye; PrintingFailed?.Invoke(this, new PrintingFailedEventArgs(handler, originalJob, ex)); PrintingEnded?.Invoke(this, new PrintingEventArgs(handler, originalJob)); @@ -1529,6 +1533,7 @@ namespace Tango.Integration.Operation if (handler.IsCanceled) { + UseKeepAlive = oldKeepAlive; Status = MachineStatuses.ReadyToDye; return; } @@ -1544,6 +1549,14 @@ namespace Tango.Integration.Operation handler.RaiseStatusReceived(response.Message.Status); _last_job_status = handler.Status; + if (response.Message.Status.Progress > 0) + { + if (oldKeepAlive != UseKeepAlive) + { + UseKeepAlive = oldKeepAlive; + } + } + if (!responseLogged) { requestSent = true; @@ -1579,6 +1592,8 @@ namespace Tango.Integration.Operation { completed = true; + UseKeepAlive = oldKeepAlive; + if (!(ex is ContinuousResponseAbortedException)) { Status = MachineStatuses.ReadyToDye; @@ -1602,6 +1617,8 @@ namespace Tango.Integration.Operation { completed = true; + UseKeepAlive = oldKeepAlive; + Status = MachineStatuses.ReadyToDye; PrintingCompleted?.Invoke(this, new PrintingEventArgs(handler, originalJob)); PrintingEnded?.Invoke(this, new PrintingEventArgs(handler, originalJob)); |
