diff --git a/beat/web/experiments/models.py b/beat/web/experiments/models.py index 547d5d59e07310f8f1035007723d0f8cb0bcbda3..80803b0215205ec6b255975f33ecebb840080c09 100644 --- a/beat/web/experiments/models.py +++ b/beat/web/experiments/models.py @@ -1025,6 +1025,9 @@ class Block(models.Model): # lock self - avoids concurrent update from scheduler/worker subsystem Block.objects.select_for_update().filter(pk=self.pk) + if self.start_date is None: + self.start_date = self.job.start_date + if self.job.result and timings: statistics = self.job.result.stats @@ -1040,7 +1043,7 @@ class Block(models.Model): data_written_time = statistics.data['time']['write'], stdout = self.job.result.stdout, stderr = self.job.result.stderr, - error_message = self.job.result.usrerr, + error_report = self.job.result.usrerr, queuing_time = timings['queuing'], linear_execution_time = timings['linear_execution'], speed_up_real = timings['speed_up_real'], @@ -1049,10 +1052,11 @@ class Block(models.Model): self.outputs.update(**info) - self.status = self.job.status - self.job.result.delete() #cascades to job deletion and split deletion + if self.job.done(): + self.end_date = self.job.end_date + self.job.result.delete() #cascades to job/job split deletion # Loads Results from cache if self.job.result and self.analyzer and self.status == Block.CACHED: