1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-18 10:26:04 +01:00
upscayl/electron/commands/stop.ts
2023-09-11 08:37:07 +05:30

17 lines
456 B
TypeScript

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