From 33ab626c96c9738f38269dc553e38769108048aa Mon Sep 17 00:00:00 2001 From: Alejandro Jaramillo Date: Mon, 28 Jun 2021 22:16:46 +0200 Subject: [PATCH] Fix reference lost when creating an agent --- faust_bootstrap/core/app/app_faust.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faust_bootstrap/core/app/app_faust.py b/faust_bootstrap/core/app/app_faust.py index 6ac357a..dd6a855 100644 --- a/faust_bootstrap/core/app/app_faust.py +++ b/faust_bootstrap/core/app/app_faust.py @@ -40,7 +40,7 @@ def __init__(self): self._cli = FaustCli() def create_agent(self, agent_function: AgentFun[Callable], channel: Union[str, ChannelT] = None, **kwargs): - self.app.agent(channel, **kwargs)(agent_function) + return self.app.agent(channel, **kwargs)(agent_function) def register_parameter(self, name: str, required: bool, help: str, type: Any, **kwargs): self._cli.add_option(name, required, help, type, **kwargs)