Ensure atomic updates for workloads

This commit is contained in:
andrew committed 2023-09-25 17:53:22 -04:00
1 parent 36fc79487b
commit 3b1821035d
1 file changed
+2 -1
+2 -1
View File
@@ -375,7 +375,8 @@ def update_test(request, machine):
with transaction.atomic():
test = Test.objects.get(id=test_id)
test = Test.objects.select_for_update().get(id=test.id)
if test.finished or test.deleted:
return { 'stop' : True }