From f802fb645d33b448b0f7e5b66182c9e104110bf8 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 23 Oct 2019 11:01:39 +0800 Subject: [PATCH] [Update] Add debug message --- apps/ops/ws.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/ops/ws.py b/apps/ops/ws.py index cd2fa33bb..343a6a8ee 100644 --- a/apps/ops/ws.py +++ b/apps/ops/ws.py @@ -41,6 +41,7 @@ class CeleryLogWebsocket(JsonWebsocketConsumer): def read_log_file(self, task_id): task_log_f = self.wait_util_log_path_exist(task_id) if not task_log_f: + logger.debug('Task log file is None: {}'.format(task_id)) return task_end_mark = [] @@ -49,7 +50,8 @@ class CeleryLogWebsocket(JsonWebsocketConsumer): if data: data = data.replace(b'\n', b'\r\n') self.send_json( - {'message': data.decode(errors='ignore'), 'task': task_id}) + {'message': data.decode(errors='ignore'), 'task': task_id} + ) if data.find(b'succeeded in') != -1: task_end_mark.append(1) if data.find(bytes(task_id, 'utf8')) != -1: