Skip to content

Commit

Permalink
修改系统内置通知模块名称,避免重复
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Feb 24, 2025
1 parent fa83761 commit f9f78b4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ __pycache__
/shell/preload/env.*
/shell/preload/notify.*
/shell/preload/*-notify.json
/shell/preload/__ql_notify__.*
4 changes: 2 additions & 2 deletions back/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions back/loaders/initFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion shell/preload/sitecustomize.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ try {

run();

const { sendNotify } = require('./notify.js');
const { sendNotify } = require('./__ql_notify__.js');
global.QLAPI = {
notify: sendNotify,
...client,
Expand Down
2 changes: 1 addition & 1 deletion shell/preload/sitecustomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def handle_sigterm(signum, frame):

run()

from notify import send
from __ql_notify__ import send

class BaseApi(Client):
def notify(self, *args, **kwargs):
Expand Down

0 comments on commit f9f78b4

Please sign in to comment.