mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'dev' into maintenance/translations-12-11
This commit is contained in:
commit
f94c3720aa
@ -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>
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user