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.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 7ee390aff..997ac4b13 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -2746,6 +2746,11 @@ namespace Tango.Integration.Operation
JobRequest request = new JobRequest();
+ var jobForJobRun = job.Clone();
+ jobForJobRun.Guid = job.Guid;
+ jobForJobRun.Name = job.Name;
+ jobForJobRun.ID = job.ID;
+
int max = job.OrderedSegmentsWithGroups.Last().SegmentIndex + 1;
for (int i = 0; i < job.NumberOfUnits - 1; i++)
@@ -2845,7 +2850,7 @@ namespace Tango.Integration.Operation
await fileUploadHandler.Cancel();
fileUploadHandler = null;
LogManager.Log("Job upload canceled.");
- OnPrintingAborted(handler, clonedJob);
+ OnPrintingAborted(handler, jobForJobRun);
handler.RaiseCanceled();
if (Status != MachineStatuses.Disconnected)
{
@@ -2860,7 +2865,7 @@ namespace Tango.Integration.Operation
}
SaveLastJobLiquidQuantities(clonedJob, originalJob.Machine.Configuration, processParameters, handler);
- OnPrintingAborted(handler, clonedJob);
+ OnPrintingAborted(handler, jobForJobRun);
handler.RaiseCanceled();
if (Status != MachineStatuses.Disconnected)
{
@@ -3051,7 +3056,7 @@ namespace Tango.Integration.Operation
LogManager.Log(ex, "Error sending job preparation request. Aborting job...");
UseKeepAlive = oldKeepAlive;
UpdateStatus(MachineStatuses.ReadyToDye);
- OnPrintingFailed(handler, clonedJob, ex);
+ OnPrintingFailed(handler, jobForJobRun, ex);
handler.RaiseFailed(ex);
return;
}
@@ -3173,7 +3178,7 @@ namespace Tango.Integration.Operation
{
UseKeepAlive = oldKeepAlive;
UpdateStatus(MachineStatuses.ReadyToDye);
- OnPrintingFailed(handler, clonedJob, ex);
+ OnPrintingFailed(handler, jobForJobRun, ex);
handler.RaiseFailed(ex);
return;
}
@@ -3278,7 +3283,7 @@ namespace Tango.Integration.Operation
finalException = new ContinuousResponseAbortedException($"Job aborted by the embedded device ({continuousException.Container.ErrorMessage}).");
}
- OnPrintingFailed(handler, originalJob, finalException);
+ OnPrintingFailed(handler, jobForJobRun, finalException);
handler.RaiseFailed(finalException);
}
}
@@ -3292,7 +3297,7 @@ namespace Tango.Integration.Operation
UpdateStatus(MachineStatuses.ReadyToDye);
SaveLastJobLiquidQuantities(clonedJob, originalJob.Machine.Configuration, processParameters, handler);
- OnPrintingCompleted(handler, clonedJob);
+ OnPrintingCompleted(handler, jobForJobRun);
handler.RaiseCompleted();
}
});