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

Merge branch 'issue_433' into 'master'

[utils] Reset experiments in a transient state after a restore (c.f. #433)



See merge request !198
parents 76dd40b7 47a3ccc2
No related branches found
No related tags found
1 merge request!198[utils] Reset experiments in a transient state after a restore (c.f. #433)
Pipeline #
......@@ -46,6 +46,7 @@ import django.core.serializers.base
from django.contrib.auth.models import User
from ....navigation.models import Agreement
from ....accounts.models import AccountSettings
from ....experiments.models import Experiment, Block
_original_save = django.core.serializers.base.DeserializedObject.save
......@@ -152,3 +153,9 @@ class Command(BaseCommand):
# removes the temporary directory
shutil.rmtree(tmpdir)
# reset all experiments in a transient state (notice Job and
# JobSplit are not backed-up because of circular dependence issues
# on the "experiments" app).
transient = (Experiment.RUNNING, Experiment.CANCELING)
for e in Experiment.objects.filter(status__in=transient): e.reset()
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