From 94ce407c1ef18718ea67e4840b9b67851d6a7f85 Mon Sep 17 00:00:00 2001 From: tamirdavid1 Date: Thu, 5 Dec 2024 14:05:24 +0200 Subject: [PATCH] fix: register at fork must be callable --- initializer/components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initializer/components.py b/initializer/components.py index 6757bf0..af61036 100644 --- a/initializer/components.py +++ b/initializer/components.py @@ -30,7 +30,7 @@ def initialize_components(trace_exporters = None, metric_exporters = None, log_e # In case of forking, the OpAMP client should be started in the child process. # e.g when using gunicorn/celery with multiple workers. os.register_at_fork( - after_in_child=start_opamp_client(threading.Event()) + after_in_child=lambda: start_opamp_client(threading.Event()), ) # pylint: disable=protected-access