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;
|