Skip to content

Commit 71327db

Browse files
committed
ignore folder which ends with _
1 parent f33d55c commit 71327db

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ tasks: # 普通任务
132132
- on_user_info # 定时任务也可以被挂载哟~
133133
``````
134134

135-
将其命名为`<脚本名字>.yaml`,并且放到`config/hooks/scripts`文件夹或子文件夹中
135+
将其命名为`<脚本名字>.yaml`,并且放到`config/hooks/scripts`文件夹或子文件夹中`scripts`文件夹中以`_`结尾的子文件夹会被忽略)
136136

137137
### 其他指令
138138

hooks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def list_all_files(root_dir) -> list[str]:
274274
for file in os.listdir(root_dir):
275275
file_path = os.path.join(root_dir, file)
276276

277-
if os.path.isdir(file_path):
277+
if os.path.isdir(file_path) and not file_path.endswith('_'):
278278
# 遍历子文件夹
279279
_files_in_a_folder.extend(list_all_files(file_path))
280280
if os.path.isfile(file_path) and (file_path.endswith('.yaml') or file_path.endswith('.yml')):

hooks/logger/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
def debug(msg: str, server: PluginServerInterface):
77
if cfg.config.debug:
8-
server.logger.info('debug: ' + msg)
8+
server.logger.info('[debug] ' + msg)

0 commit comments

Comments
 (0)