Minor changes.

This commit is contained in:
Rhinemann 2023-05-08 12:27:39 +03:00
parent d1f7019f89
commit efac73776f
2 changed files with 2 additions and 10 deletions

View File

@ -157,14 +157,6 @@ class ModuleControlUnit:
except Exception as e: except Exception as e:
print(f"[ERROR] module_loader: error while loading module \"{folder}\" ({e})") print(f"[ERROR] module_loader: error while loading module \"{folder}\" ({e})")
# message queue object to go back to synchronous message processing
# class MessageQueue:
# def __init__(self):
# print("[INFO] Initializing the message queue...")
# self.queue = []
# synchronous message processor # synchronous message processor
def queue_processor(): def queue_processor():
while True: while True:

View File

@ -24,8 +24,8 @@ module_path = ""
def get_human_readable_date(start_datetime, end_datetime, def get_human_readable_date(start_datetime, end_datetime,
current_day, current_week): current_day, current_week):
human_readable_date = "" human_readable_date = ""
if ((current_day + 2) == int(start_datetime.strftime("%u"))) or ( if ((current_day + 2) == int(start_datetime.strftime("%u"))) or \
(current_day == 6) and (start_datetime.strftime("%u") == "1")): ((current_day == 6) and (start_datetime.strftime("%u") == "1")):
human_readable_date += "завтра " human_readable_date += "завтра "
elif current_week != int(start_datetime.strftime("%W")) % 2: elif current_week != int(start_datetime.strftime("%W")) % 2:
human_readable_date += f"{WEEKDAYS_GENITIVE_NEXT[int(start_datetime.strftime('%u')) - 1]} " human_readable_date += f"{WEEKDAYS_GENITIVE_NEXT[int(start_datetime.strftime('%u')) - 1]} "