Merge branch 'dev' into maintenance/translations-12-11

This commit is contained in:
Zedifus 2023-12-13 01:47:36 +00:00
commit f94c3720aa
3 changed files with 28 additions and 0 deletions

View File

@ -23,6 +23,7 @@
- Setup logging for panel authentication attempts ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/669))
- Update minimum password length from 6 to 8, and unrestrict maximum password length ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/669))
- Give better feedback when backup delete fails ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/681))
- Add user queue debug logging ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/683))
### Lang
- pl_PL Minor fixes ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/675))
<br><br>

View File

@ -23,6 +23,7 @@ from app.classes.web.tornado_handler import Webserver
from app.classes.shared.websocket_manager import WebSocketManager
logger = logging.getLogger("apscheduler")
command_log = logging.getLogger("cmd_queue")
scheduler_intervals = {
"seconds",
"minutes",
@ -94,7 +95,15 @@ class TasksManager:
def command_watcher(self):
while True:
# select any commands waiting to be processed
command_log.debug(
"Queue currently has "
f"{self.controller.management.command_queue.qsize()} queued commands."
)
if not self.controller.management.command_queue.empty():
command_log.info(
"Current queued commands: "
f"{list(self.controller.management.command_queue.queue)}"
)
cmd = self.controller.management.command_queue.get()
try:
svr = self.controller.servers.get_server_instance_by_id(

View File

@ -13,6 +13,9 @@
},
"auth": {
"format": "%(asctime)s - [AUTH] - %(levelname)s - %(message)s"
},
"cmd_queue": {
"format": "%(asctime)s - [CMD_QUEUE] - %(levelname)s - %(message)s"
}
},
"handlers": {
@ -59,6 +62,14 @@
"maxBytes": 10485760,
"backupCount": 20,
"encoding": "utf8"
},
"cmd_queue_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"formatter": "auth",
"filename": "logs/cmd_queue.log",
"maxBytes": 10485760,
"backupCount": 20,
"encoding": "utf8"
}
},
"loggers": {
@ -90,6 +101,13 @@
"auth_file_handler"
],
"propagate": false
},
"cmd_queue": {
"level": "INFO",
"handlers": [
"cmd_queue_file_handler"
],
"propagate": false
}
}
}