Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit a04b9ff

Browse files
committed
Temporarily disable save on exit
Lowers effect #217 a lot. Will be re-added once that is fixed
1 parent 70ad490 commit a04b9ff

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

nodecg-io-core/extension/index.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = (nodecg: NodeCG): NodeCGIOCore => {
3232
persistenceManager,
3333
).registerMessageHandlers();
3434

35-
registerExitHandlers(nodecg, bundleManager, instanceManager, serviceManager, persistenceManager);
35+
registerExitHandlers(nodecg, bundleManager, instanceManager, serviceManager);
3636

3737
// We use a extra object instead of returning a object containing all the managers and so on, because
3838
// any loaded bundle would be able to call any (public or private) of the managers which is not intended.
@@ -62,12 +62,7 @@ function onExit(
6262
bundleManager: BundleManager,
6363
instanceManager: InstanceManager,
6464
serviceManager: ServiceManager,
65-
persistenceManager: PersistenceManager,
6665
): void {
67-
// Save everything
68-
// This is especially important if some services update some configs (e.g. updated tokens) and they haven't been saved yet.
69-
persistenceManager.save();
70-
7166
// Unset all service instances in all bundles
7267
const bundles = bundleManager.getBundleDependencies();
7368
for (const bundleName in bundles) {
@@ -104,10 +99,9 @@ function registerExitHandlers(
10499
bundleManager: BundleManager,
105100
instanceManager: InstanceManager,
106101
serviceManager: ServiceManager,
107-
persistenceManager: PersistenceManager,
108102
): void {
109103
const handler = () => {
110-
onExit(nodecg, bundleManager, instanceManager, serviceManager, persistenceManager);
104+
onExit(nodecg, bundleManager, instanceManager, serviceManager);
111105
};
112106

113107
// Normal exit

0 commit comments

Comments
 (0)