Skip to content

Commit fe3ffe1

Browse files
committed
feat: add warning to runner
1 parent 6400cee commit fe3ffe1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/rai_core/rai/agents/runner.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import logging
1516
import signal
1617
from threading import Event
1718
from typing import List
1819

1920
from rai.agents.base import BaseAgent
2021

22+
logger = logging.getLogger(__name__)
23+
2124

2225
def wait_for_shutdown(agents: List[BaseAgent]):
2326
"""Blocks execution until shutdown signal (SIGINT/SIGTERM) is received.
@@ -50,6 +53,11 @@ def run_agents(agents: List[BaseAgent]):
5053
Args:
5154
agents: List of agent instances
5255
"""
56+
logger.info(
57+
"run_agents is an experimental function. \
58+
If you believe that your agents are not running properly, \
59+
please run them separately (in different processes)."
60+
)
5361
for agent in agents:
5462
agent.run()
5563

@@ -63,8 +71,14 @@ class AgentRunner:
6371

6472
def __init__(self, agents: List[BaseAgent]):
6573
self.agents = agents
74+
self.logger = logging.getLogger(__name__)
6675

6776
def run(self):
77+
self.logger.info(
78+
f"{self.__class__.__name__}.{self.run.__name__} is an experimental function. \
79+
If you believe that your agents are not running properly, \
80+
please run them separately (in different processes)."
81+
)
6882
for agent in self.agents:
6983
agent.run()
7084

0 commit comments

Comments
 (0)