feature/IO-3205-Paint-Scale-Integrations: Checkpoint
This commit is contained in:
@@ -373,17 +373,17 @@ app.whenReady().then(async () => {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//Dynamically load ipcMain handlers once ready.
|
||||
try {
|
||||
// Replace 'path/to/your/file' with the actual path to your file
|
||||
const module = await import("./ipc/ipcMainConfig");
|
||||
log.debug("Successfully loaded ipcMainConfig");
|
||||
|
||||
// You can now use anything exported from the module
|
||||
// For example:
|
||||
// module.someFunction()
|
||||
log.debug("Successfully loaded ipcMainConfig", module);
|
||||
// Initialize cron tasks after loading ipcMainConfig
|
||||
await module.initializeCronTasks();
|
||||
log.info("Cron tasks initialized successfully");
|
||||
} catch (error) {
|
||||
log.error("Failed to load ipcMainConfig", {
|
||||
log.error("Failed to load ipcMainConfig or initialize cron tasks", {
|
||||
...ErrorTypeCheck(error),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user