1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-24 15:40:21 +01:00
upscayl/electron/commands/stop.ts
2023-09-11 08:37:07 +05:30

15 lines
412 B
TypeScript

import mainWindow from "../main-window";
import { getChildProcesses, setStop } from "../utils/config-variables";
import logit from "../utils/logit";
const stop = async (event, payload) => {
setStop(true);
mainWindow && mainWindow.setProgressBar(-1);
getChildProcesses().forEach((child) => {
logit("🛑 Stopping Upscaling Process", child.process.pid);
child.kill();
});
};
export default stop;