]> git.ipfire.org Git - pbs.git/commitdiff
backend: Allow passing keyword arguments to background tasks
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Feb 2025 14:43:39 +0000 (14:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Feb 2025 14:43:39 +0000 (14:43 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/__init__.py

index 57d1c0f524d77e6e5c50a74596fe6bce9a1a8115..b08e1fcc8845e70b06350ba213535127cfedaec6 100644 (file)
@@ -186,12 +186,12 @@ class Backend(object):
 
        # Functions to run something in background
 
-       def run_task(self, callback, *args):
+       def run_task(self, callback, *args, **kwargs):
                """
                        Runs the given coroutine in the background
                """
                # Create a new task
-               task = asyncio.create_task(callback(*args))
+               task = asyncio.create_task(callback(*args, **kwargs))
 
                # Keep a reference to the task and remove it when the task has finished
                self.__tasks.add(task)