From 9df63d222dadcd7eedd66a066a43f65c8e18ceec Mon Sep 17 00:00:00 2001 From: Cole Bailey Date: Thu, 20 Jun 2024 20:46:34 +0200 Subject: [PATCH] add: worker thread names --- .../flagd/resolvers/process/connector/file_watcher.py | 4 +++- .../flagd/resolvers/process/connector/grpc_watcher.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/file_watcher.py b/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/file_watcher.py index db0e41f..a33601c 100644 --- a/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/file_watcher.py +++ b/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/file_watcher.py @@ -36,7 +36,9 @@ def __init__( def initialize(self, evaluation_context: EvaluationContext) -> None: self.active = True - self.thread = threading.Thread(target=self.refresh_file, daemon=True) + self.thread = threading.Thread( + target=self.refresh_file, daemon=True, name="FlagdFileWatcherWorkerThread" + ) self.thread.start() # Let this throw exceptions so that provider status is set correctly diff --git a/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py b/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py index debc69a..9afbd6a 100644 --- a/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py +++ b/providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py @@ -37,7 +37,9 @@ def __init__( def initialize(self, context: EvaluationContext) -> None: self.active = True - self.thread = threading.Thread(target=self.sync_flags, daemon=True) + self.thread = threading.Thread( + target=self.sync_flags, daemon=True, name="FlagdGrpcSyncWorkerThread" + ) self.thread.start() ## block until ready or deadline reached