diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d16fd4f4..a7ea6320 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,8 @@ Brewtils Changelog TBD - Fixed self reference bug that was returning back output instead of Request object. +- Fixed self reference bug, when SystemClient calls itself but doesn't have a current request it + now sends it to Beer Garden instead of attempting to process it locally. 3.23.0 ------ diff --git a/brewtils/rest/system_client.py b/brewtils/rest/system_client.py index d41cd78b..561fda82 100644 --- a/brewtils/rest/system_client.py +++ b/brewtils/rest/system_client.py @@ -424,7 +424,10 @@ def send_bg_request(self, *args, **kwargs): # If not blocking just return the future if not blocking: - if not self.target_self: + # TODO: Investigate if self targeting requests with no parents can be processed locally + if not self.target_self or not getattr( + brewtils.plugin.request_context, "current_request", None + ): return self._thread_pool.submit( self._wait_for_request, request, raise_on_error, timeout )