Skip to content

Commit 4fed01d

Browse files
authored
Made cli_start_mq_bot hang infinitely to preserve main thread (#193)
1 parent 262dd5e commit 4fed01d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

chatbot_core/cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import click
2323

2424
from os.path import expanduser, relpath
25+
26+
from ovos_utils import wait_for_exit_signal
2527
from ovos_utils.log import LOG, log_deprecation
2628

2729

@@ -73,7 +75,10 @@ def cli_start_mq_bot():
7375
parser.add_argument("--bot", dest="bot_name",
7476
help="Chatbot entrypoint name", type=str)
7577
args = parser.parse_args()
76-
run_mq_bot(args.bot_name)
78+
79+
bot = run_mq_bot(args.bot_name)
80+
wait_for_exit_signal()
81+
bot.stop()
7782

7883

7984
def cli_start_bots():

0 commit comments

Comments
 (0)