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

[experiments] Allow users to change experiments that were partially run

parent e1bdf044
No related branches found
No related tags found
1 merge request!194Scheduler
Pipeline #
......@@ -549,10 +549,13 @@ class Experiment(Shareable):
# Ties the block in
slots = job_description.get('nb_slots')
b, _ = Block.objects.get_or_create(experiment=self,
name=block_name, algorithm=algorithm)
b = Block.objects.filter(experiment=self, name=block_name).first()
if b is None:
b = Block(experiment=self, name=block_name, algorithm=algorithm)
else:
b.algorithm = algorithm
b.command=simplejson.dumps(job_description, indent=4)
b.status=Block.NOT_CACHED if (self.status == Experiment.PENDING) else b.status
b.status=Block.NOT_CACHED
b.analyzer=algorithm.analysis()
b.environment=env
b.queue=queue
......
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