1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-01-24 23:13:45 +01:00

17 lines
456 B
TypeScript
Raw Normal View History

2023-09-10 23:12:18 +05:30
import { getMainWindow } from "../main-window";
import { childProcesses, setStopped } from "../utils/config-variables";
2023-09-10 14:44:04 +05:30
import logit from "../utils/logit";
const stop = async (event, payload) => {
2023-09-10 23:24:08 +05:30
const mainWindow = getMainWindow();
2023-09-10 23:12:18 +05:30
setStopped(true);
2023-09-10 14:44:04 +05:30
mainWindow && mainWindow.setProgressBar(-1);
2023-09-10 23:12:18 +05:30
childProcesses.forEach((child) => {
2023-09-10 14:44:04 +05:30
logit("🛑 Stopping Upscaling Process", child.process.pid);
child.kill();
});
};
export default stop;