This commit is contained in:
Manav Rathi 2024-05-15 13:26:45 +05:30
parent 5dd3315ca2
commit 585c0a8285
No known key found for this signature in database
2 changed files with 13 additions and 13 deletions

View file

@ -207,13 +207,6 @@ export default function App({ Component, pageProps }: AppProps) {
await resumeExportsIfNeeded();
};
initExport();
try {
eventBus.on(Events.LOGOUT, () => {
exportService.disableContinuousExport();
});
} catch (e) {
log.error("Error while subscribing to logout event", e);
}
}, []);
const setUserOnline = () => setOffline(false);

View file

@ -2,6 +2,7 @@ import log from "@/next/log";
import { accountLogout } from "@ente/accounts/services/logout";
import { Events, eventBus } from "@ente/shared/events";
import { clipService } from "services/clip-service";
import exportService from "./export";
import mlWorkManager from "./machineLearning/mlWorkManager";
/**
@ -20,14 +21,20 @@ export const photosLogout = async () => {
log.error("Ignoring error in CLIP logout", e);
}
try {
await mlWorkManager.setMlSearchEnabled(false);
} catch (e) {
log.error("Ignoring error in ML logout", e);
}
const electron = globalThis.electron;
if (electron) {
try {
await mlWorkManager.setMlSearchEnabled(false);
} catch (e) {
log.error("Ignoring error in ML logout", e);
}
try {
exportService.disableContinuousExport();
} catch (e) {
log.error("Ignoring error when export logout", e);
}
try {
await electron?.logout();
} catch (e) {