mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修改依赖操作状态判断
This commit is contained in:
@@ -153,10 +153,17 @@ export default class DependenceService {
|
||||
const docs = await DependenceModel.findAll({ where: { id: ids } });
|
||||
for (const doc of docs) {
|
||||
taskLimit.removeQueuedDependency(doc);
|
||||
const depRunCommand = InstallDependenceCommandTypes[doc.type];
|
||||
const cmd = `${depRunCommand} ${doc.name.trim()}`;
|
||||
const pid = await getPid(cmd);
|
||||
pid && (await killTask(pid));
|
||||
const depInstallCommand = InstallDependenceCommandTypes[doc.type];
|
||||
const depUnInstallCommand = unInstallDependenceCommandTypes[doc.type];
|
||||
const installCmd = `${depInstallCommand} ${doc.name.trim()}`;
|
||||
const unInstallCmd = `${depUnInstallCommand} ${doc.name.trim()}`;
|
||||
const pids = await Promise.all([
|
||||
getPid(installCmd),
|
||||
getPid(unInstallCmd),
|
||||
]);
|
||||
for (const pid of pids) {
|
||||
pid && (await killTask(pid));
|
||||
}
|
||||
}
|
||||
await this.removeDb(ids);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user