aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 96c8e5ccf..9768498c6 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -2354,6 +2354,12 @@ namespace Tango.Integration.Operation
ThreadFactory.StartNew(async () =>
{
+ if (handler.IsCanceled)
+ {
+ Status = MachineStatuses.ReadyToDye;
+ return;
+ }
+
Status = MachineStatuses.GettingReady;
RunningJob = clonedJob;
OnPrintingStarted(handler, clonedJob);
@@ -2429,6 +2435,12 @@ namespace Tango.Integration.Operation
LogManager.Log($"Job upload method is set to {JobUploadStrategy}...");
+ if (handler.IsCanceled)
+ {
+ Status = MachineStatuses.ReadyToDye;
+ return;
+ }
+
var oldKeepAlive = UseKeepAlive;
if (JobUploadStrategy == JobUploadStrategy.JobDescriptionFile)
@@ -2449,9 +2461,21 @@ namespace Tango.Integration.Operation
Message = "Uploading job description file...",
});
+ if (handler.IsCanceled)
+ {
+ Status = MachineStatuses.ReadyToDye;
+ return;
+ }
+
LogManager.Log("Creating storage API manager...");
var storage = CreateStorageManager();
+ if (handler.IsCanceled)
+ {
+ Status = MachineStatuses.ReadyToDye;
+ return;
+ }
+
//Suppress keep alive while job uploads.
//storage.SuppressKeepAliveWhileFileUploads = true;
UseKeepAlive = false; //This is a work around for Shlomo not managing to keep alive while parsing the file.