From f9f78b4e052078312e70a7a270ec644a6ce16db9 Mon Sep 17 00:00:00 2001 From: whyour Date: Tue, 25 Feb 2025 00:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F=E5=86=85?= =?UTF-8?q?=E7=BD=AE=E9=80=9A=E7=9F=A5=E6=A8=A1=E5=9D=97=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + back/config/index.ts | 4 ++-- back/loaders/initFile.ts | 4 ++-- shell/preload/sitecustomize.js | 2 +- shell/preload/sitecustomize.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 773d481a..709791ed 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ __pycache__ /shell/preload/env.* /shell/preload/notify.* /shell/preload/*-notify.json +/shell/preload/__ql_notify__.* diff --git a/back/config/index.ts b/back/config/index.ts index be155ef5..9b39daf4 100644 --- a/back/config/index.ts +++ b/back/config/index.ts @@ -42,8 +42,8 @@ const systemLogPath = path.join(dataPath, 'syslog/'); const envFile = path.join(preloadPath, 'env.sh'); const jsEnvFile = path.join(preloadPath, 'env.js'); const pyEnvFile = path.join(preloadPath, 'env.py'); -const jsNotifyFile = path.join(preloadPath, 'notify.js'); -const pyNotifyFile = path.join(preloadPath, 'notify.py'); +const jsNotifyFile = path.join(preloadPath, '__ql_notify__.js'); +const pyNotifyFile = path.join(preloadPath, '__ql_notify__.py'); const confFile = path.join(configPath, 'config.sh'); const crontabFile = path.join(configPath, 'crontab.list'); const authConfigFile = path.join(configPath, 'auth.json'); diff --git a/back/loaders/initFile.ts b/back/loaders/initFile.ts index b8629bc0..d613085e 100644 --- a/back/loaders/initFile.ts +++ b/back/loaders/initFile.ts @@ -27,8 +27,8 @@ const sampleNotifyJsFile = path.join(samplePath, 'notify.js'); const sampleNotifyPyFile = path.join(samplePath, 'notify.py'); const scriptNotifyJsFile = path.join(scriptPath, 'sendNotify.js'); const scriptNotifyPyFile = path.join(scriptPath, 'notify.py'); -const jsNotifyFile = path.join(preloadPath, 'notify.js'); -const pyNotifyFile = path.join(preloadPath, 'notify.py'); +const jsNotifyFile = path.join(preloadPath, '__ql_notify__.js'); +const pyNotifyFile = path.join(preloadPath, '__ql_notify__.py'); const TaskBeforeFile = path.join(configPath, 'task_before.sh'); const TaskBeforeJsFile = path.join(configPath, 'task_before.js'); const TaskBeforePyFile = path.join(configPath, 'task_before.py'); diff --git a/shell/preload/sitecustomize.js b/shell/preload/sitecustomize.js index 424674f7..f80c57f8 100644 --- a/shell/preload/sitecustomize.js +++ b/shell/preload/sitecustomize.js @@ -98,7 +98,7 @@ try { run(); - const { sendNotify } = require('./notify.js'); + const { sendNotify } = require('./__ql_notify__.js'); global.QLAPI = { notify: sendNotify, ...client, diff --git a/shell/preload/sitecustomize.py b/shell/preload/sitecustomize.py index 7e796e61..3d3626f7 100644 --- a/shell/preload/sitecustomize.py +++ b/shell/preload/sitecustomize.py @@ -107,7 +107,7 @@ try: run() - from notify import send + from __ql_notify__ import send class BaseApi(Client): def notify(self, *args, **kwargs):