MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getDb

Method getDb

tmp_admin/tmp_admin.ts:745–751  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

743 return this.dbPromise;
744 }
745
746 private async mutateDb(mutator: (data: TmpAdminDB) => void): Promise<void> {
747 const run = this.dbQueue.then(async () => {
748 const db = await this.getDb();
749 await db.read();
750 if (!db.data) db.data = { jobs: {} };
751 if (!db.data.jobs) db.data.jobs = {};
752 mutator(db.data);
753 await db.write();
754 });

Callers 2

mutateDbMethod · 0.95
restoreJobsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected