From 759c04a48f369c5cb40ac4ca66591ff44aa8bd42 Mon Sep 17 00:00:00 2001 From: Michal Tuszowski Date: Tue, 7 Jul 2026 23:24:12 +0200 Subject: [PATCH] add --- bot.py | 3 ++- communication_subroutine.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index a1105e1..0aec7e6 100755 --- a/bot.py +++ b/bot.py @@ -20,7 +20,7 @@ from discord.ext import commands from communication_subroutine import comm_subroutine from constants import ENCODING, LOGFILE, TOKEN logger = logging.getLogger("discord") -logger.setLevel(logging.INFO) +logger.setLevel(logging.DEBUG) handler = handlers.RotatingFileHandler( filename=LOGFILE, encoding=ENCODING, @@ -114,6 +114,7 @@ async def main() -> None: shutdown_event = asyncio.Event() comm_stop_event = threading.Event() + comm_task = asyncio.create_task(_run_comm_subroutine(comm_stop_event)) bot_task = asyncio.create_task(_run_bot(TOKEN, shutdown_event)) diff --git a/communication_subroutine.py b/communication_subroutine.py index 0edcc31..d185ef9 100644 --- a/communication_subroutine.py +++ b/communication_subroutine.py @@ -11,9 +11,9 @@ from urllib import request as urequest from flask import Flask, abort, jsonify, request from waitress import serve -HOST_ADDRESS = os.getenv("CONJURER_DISCORD_HOST", "192.168.1.31") +HOST_ADDRESS = os.getenv("CONJURER_DISCORD_HOST", "192.168.1.92") PORT_ADDRESS = int(os.getenv("CONJURER_DISCORD_PORT", "5000")) -ICECAST_ADDRESS = os.getenv("CONJURER_ICECAST", "http://192.168.1.15:8000") +ICECAST_ADDRESS = os.getenv("CONJURER_ICECAST", "http://192.168.1.12:8000") API_KEY = os.getenv("CONJURER_API_KEY") OUT_COMM_Q = Queue() IN_COMM_Q = Queue() @@ -234,11 +234,11 @@ def comm_subroutine(stop_event: Optional[threading.Event] = None): :param stop_event: optional :class:`threading.Event` shared with the caller to coordinate a cooperative shutdown. """ - # logger.setLevel(logging.DEBUG) + logger.setLevel(logging.DEBUG) logger = logging.getLogger("discord") logger.info("Started comms") threads = [] - # threads.append(threading.Thread(target=flask_debug)) + threads.append(threading.Thread(target=flask_debug)) threads.append(threading.Thread(target=waitress_run, daemon=True)) threads.append( threading.Thread(