From b7bf811ae38caa95adb86f674938809e942fa951 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 19 Aug 2024 14:20:38 +0100 Subject: [PATCH] Fix default value for serviceReady --- softpack_core/service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/softpack_core/service.py b/softpack_core/service.py index 71a3ce5..caecf60 100644 --- a/softpack_core/service.py +++ b/softpack_core/service.py @@ -6,6 +6,7 @@ import urllib.parse +from multiprocessing import Event from multiprocessing.synchronize import Event as EventClass from pathlib import Path @@ -52,7 +53,7 @@ def run( help="Create and use this branch of Artefacts repo.", ), ] = 'main', - serviceReady: EventClass = None, + serviceReady: EventClass = Event(), ) -> None: """Start the SoftPack Core REST API service. @@ -70,8 +71,7 @@ def run( artifacts.clone_repo(branch=branch) - if serviceReady is not None: - serviceReady.set() + serviceReady.set() uvicorn.run( "softpack_core.app:app.router", host=app.settings.server.host,