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