Resolve possible update memory leak.,
This commit is contained in:
@@ -10,6 +10,12 @@ export default defineConfig({
|
||||
sentryVitePlugin({
|
||||
org: "imex",
|
||||
project: "imex-partner",
|
||||
sourcemaps: {
|
||||
filesToDeleteAfterUpload: ["**.js.map"],
|
||||
},
|
||||
release: {
|
||||
name: `bodyshop-desktop@${process.env.npm_package_version}`,
|
||||
},
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
@@ -32,6 +38,12 @@ export default defineConfig({
|
||||
sentryVitePlugin({
|
||||
org: "imex",
|
||||
project: "imex-partner",
|
||||
sourcemaps: {
|
||||
filesToDeleteAfterUpload: ["**.js.map"],
|
||||
},
|
||||
release: {
|
||||
name: `bodyshop-desktop@${process.env.npm_package_version}`,
|
||||
},
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bodyshop-desktop",
|
||||
"version": "1.0.7-alpha.2",
|
||||
"version": "1.0.7-alpha.3",
|
||||
"description": "Shop Management System Partner",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "Convenient Brands, LLC",
|
||||
|
||||
@@ -46,6 +46,13 @@ Sentry.init({
|
||||
});
|
||||
|
||||
log.initialize();
|
||||
|
||||
// Configure log format to include process ID
|
||||
log.transports.file.format =
|
||||
"[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] [PID:{processId}] {text}";
|
||||
log.transports.console.format =
|
||||
"[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] [PID:{processId}] {text}";
|
||||
log.transports.file.maxSize = 50 * 1024 * 1024; // 50 MB
|
||||
const isMac: boolean = process.platform === "darwin";
|
||||
const protocol: string = "imexmedia";
|
||||
let isAppQuitting = false; //Needed on Mac as an override to allow us to fully quit the app.
|
||||
@@ -58,6 +65,7 @@ if (!gotTheLock) {
|
||||
log.warn(
|
||||
"Another instance is already running and could not obtain mutex lock. Exiting this instance.",
|
||||
);
|
||||
isAppQuitting = true;
|
||||
app.quit(); // Quit the app if another instance is already running
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
import { autoUpdater } from "electron-updater";
|
||||
import { setReleaseChannel } from "../ipc/ipcMainHandler.user";
|
||||
|
||||
let continuousUpdatesTriggered = false;
|
||||
|
||||
async function checkForAppUpdatesContinuously(): Promise<void> {
|
||||
if (!continuousUpdatesTriggered) {
|
||||
continuousUpdatesTriggered = true;
|
||||
checkForAppUpdates();
|
||||
setInterval(
|
||||
() => {
|
||||
checkForAppUpdatesContinuously();
|
||||
checkForAppUpdates();
|
||||
},
|
||||
1000 * 60 * 30,
|
||||
);
|
||||
}
|
||||
}
|
||||
async function checkForAppUpdates(): Promise<void> {
|
||||
await setReleaseChannel();
|
||||
|
||||
@@ -193,6 +193,11 @@ memLogger.transports.file.resolvePathFn = () => {
|
||||
);
|
||||
return filePath;
|
||||
};
|
||||
// Configure memory logger format to include process ID
|
||||
memLogger.transports.file.format =
|
||||
"[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] [PID:{processId}] {text}";
|
||||
memLogger.transports.console.format =
|
||||
"[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] [PID:{processId}] {text}";
|
||||
|
||||
export async function dumpMemoryStatsToFile() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user