mirror of
https://github.com/upscayl/upscayl.git
synced 2024-12-18 10:26:04 +01:00
17 lines
456 B
TypeScript
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;
|