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 }
744
745 private getDb(): Promise<Low<TmpAdminDB>> {
746 if (!this.dbPromise) {
747 const filePath = path.join(createDirectoryInAssets(pluginName), "jobs.json");
748 this.dbPromise = JSONFilePreset<TmpAdminDB>(filePath, { jobs: {} });
749 }
750 return this.dbPromise;
751 }
752
753 private async mutateDb(mutator: (data: TmpAdminDB) => void): Promise<void> {
754 const run = this.dbQueue.then(async () => {

Callers 2

mutateDbMethod · 0.95
restoreJobsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected