This commit is contained in:
2024-03-29 21:29:55 +01:00
parent 0a118eac0d
commit f1653d23ad
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -587,6 +587,7 @@ async def check_data():
"""
# trunk-ignore(codespell/misspelled)
# TODO: dlaczego sie tu wypierdala
logger.info("Heartbeat of cleanup proc")
if os.path.getsize(LOGFILE) > 6000000:
channel = client.get_channel(1062047571557744721)
await channel.send(
@@ -675,7 +676,7 @@ async def get_random_cyclic_message():
else:
channel_id = 1062047367337095268
channel = client.get_channel(channel_id)
logger.info("Wtracenie sie w dyskusje")
logger.info("Wtracenie w dyskusje")
messages = [message async for message in channel.history(limit=50)]
for message in messages:
temp = {"role": "user", "content": message.author + ":" + message.content}
+3 -2
View File
@@ -33,7 +33,8 @@ if platform in ("linux", "linux2"):
music_file_list = []
def rescan():
def rescan(logger):
logger.info("Rescan triggered")
for mp3_item in Path.glob(Path(MUSIC_FOLDER), "**/*.mp3"):
temp_music_file = mp3_item.as_posix()
if platform == "win32":
@@ -68,7 +69,7 @@ def update_music_list():
if __name__ == "__main__":
rescan()
thread = threading.Thread(target=thread_rescan, args=("Updater",app.logger))
thread = threading.Thread(target=thread_rescan, args=["Updater",app.logger])
thread.start()
app.run(debug=True, host="0.0.0.0")
#from waitress import serve