From 96eb87f9356b85da8c57be2281c66a56d67f926f Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 19 Apr 2023 14:13:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=8D=E5=8A=A1=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=E6=A0=A1=E9=AA=8C=20migrations=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89=E5=86=B2=E7=AA=81(DEBUG=5FDEV)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/signal_handlers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/common/signal_handlers.py b/apps/common/signal_handlers.py index 752682c51..b7acf6e79 100644 --- a/apps/common/signal_handlers.py +++ b/apps/common/signal_handlers.py @@ -134,7 +134,7 @@ def check_migrations_file_prefix_conflict(*args, **kwargs): return from jumpserver.const import BASE_DIR - print('>>> Check migrations file prefix conflict') + print('>>> Check migrations file prefix conflict.', end=' ') # 指定 app 目录 _dir = BASE_DIR # 获取所有子目录 @@ -167,8 +167,12 @@ def check_migrations_file_prefix_conflict(*args, **kwargs): else: prefix_file_map[file_prefix] = file + conflict_count = len(conflict_files) + print(f'Conflict count:({conflict_count})') + if not conflict_count: + return + print('='*80) - print(f'Conflict count:({len(conflict_files)})') for conflict_file in conflict_files: msg_dir = '{:<15}'.format(conflict_file[0]) msg_split = '=> '