mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-25 00:16:06 +08:00
修复 pm2 重启逻辑
This commit is contained in:
parent
93e94ea94c
commit
bd166ee794
|
@ -18,7 +18,7 @@ export class Dependence {
|
||||||
: DependenceStatus.queued;
|
: DependenceStatus.queued;
|
||||||
this.type = options.type || DependenceTypes.nodejs;
|
this.type = options.type || DependenceTypes.nodejs;
|
||||||
this.timestamp = new Date().toString();
|
this.timestamp = new Date().toString();
|
||||||
this.name = options.name;
|
this.name = options.name.trim();
|
||||||
this.log = options.log || [];
|
this.log = options.log || [];
|
||||||
this.remark = options.remark || '';
|
this.remark = options.remark || '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ export default class DependenceService {
|
||||||
const socketMessageType = isInstall
|
const socketMessageType = isInstall
|
||||||
? 'installDependence'
|
? 'installDependence'
|
||||||
: 'uninstallDependence';
|
: 'uninstallDependence';
|
||||||
const depName = dependency.name;
|
const depName = dependency.name.trim();
|
||||||
const depRunCommand = (
|
const depRunCommand = (
|
||||||
isInstall
|
isInstall
|
||||||
? InstallDependenceCommandTypes
|
? InstallDependenceCommandTypes
|
||||||
|
@ -191,7 +191,7 @@ export default class DependenceService {
|
||||||
if (isInstall) {
|
if (isInstall) {
|
||||||
const getCommandPrefix = GetDependenceCommandTypes[dependency.type];
|
const getCommandPrefix = GetDependenceCommandTypes[dependency.type];
|
||||||
const depVersionStr = versionDependenceCommandTypes[dependency.type];
|
const depVersionStr = versionDependenceCommandTypes[dependency.type];
|
||||||
const [_depName] = dependency.name.split(depVersionStr);
|
const [_depName] = dependency.name.trim().split(depVersionStr);
|
||||||
const depInfo = (
|
const depInfo = (
|
||||||
await promiseExecSuccess(
|
await promiseExecSuccess(
|
||||||
dependency.type === DependenceTypes.linux
|
dependency.type === DependenceTypes.linux
|
||||||
|
|
|
@ -313,8 +313,8 @@ reload_pm2() {
|
||||||
# 代理会影响 grpc 服务
|
# 代理会影响 grpc 服务
|
||||||
unset_proxy
|
unset_proxy
|
||||||
pm2 flush &>/dev/null
|
pm2 flush &>/dev/null
|
||||||
pm2 kill &>/dev/null
|
pm2 startOrGracefulReload $file_ecosystem_js --update-env
|
||||||
pm2 startOrGracefulReload $file_ecosystem_js
|
pm2 sendSignal SIGKILL panel &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
diff_time() {
|
diff_time() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user