Skip to content
Snippets Groups Projects
Commit 0582b2c7 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[experiments] Fix start_date setup; Other minor fixes

parent b8d9a365
No related branches found
No related tags found
1 merge request!194Scheduler
...@@ -1025,6 +1025,9 @@ class Block(models.Model): ...@@ -1025,6 +1025,9 @@ class Block(models.Model):
# lock self - avoids concurrent update from scheduler/worker subsystem # lock self - avoids concurrent update from scheduler/worker subsystem
Block.objects.select_for_update().filter(pk=self.pk) 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: if self.job.result and timings:
statistics = self.job.result.stats statistics = self.job.result.stats
...@@ -1040,7 +1043,7 @@ class Block(models.Model): ...@@ -1040,7 +1043,7 @@ class Block(models.Model):
data_written_time = statistics.data['time']['write'], data_written_time = statistics.data['time']['write'],
stdout = self.job.result.stdout, stdout = self.job.result.stdout,
stderr = self.job.result.stderr, stderr = self.job.result.stderr,
error_message = self.job.result.usrerr, error_report = self.job.result.usrerr,
queuing_time = timings['queuing'], queuing_time = timings['queuing'],
linear_execution_time = timings['linear_execution'], linear_execution_time = timings['linear_execution'],
speed_up_real = timings['speed_up_real'], speed_up_real = timings['speed_up_real'],
...@@ -1049,10 +1052,11 @@ class Block(models.Model): ...@@ -1049,10 +1052,11 @@ class Block(models.Model):
self.outputs.update(**info) self.outputs.update(**info)
self.status = self.job.status 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 # Loads Results from cache
if self.job.result and self.analyzer and self.status == Block.CACHED: if self.job.result and self.analyzer and self.status == Block.CACHED:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment