]> git.ipfire.org Git - pbs.git/commitdiff
builds: Immediately launch builds in the transaction
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Aug 2023 10:05:02 +0000 (10:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Aug 2023 10:05:02 +0000 (10:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/builds.py

index 1440f1c6ac9872261b2b30e00fd992bdadbcc93a..5835d8a8e48b77bdce5fc96862c2c8c7112477a1 100644 (file)
@@ -58,15 +58,15 @@ class APIv1IndexHandler(base.APIMixin, base.BaseHandler):
                        # Delete the upload
                        await upload.delete()
 
+                       # Launch the build
+                       await self.backend.builds.launch([build])
+
                # Send some data about the build
                self.finish({
-                       "uuid" : build.uuid,
+                       "uuid" : "%s" % build.uuid,
                        "name" : "%s" % build,
                })
 
-               # Launch all jobs (in the background)
-               self.backend.run_task(self.backend.builds.launch, [build])
-
 
 class IndexHandler(base.BaseHandler):
        def get(self):