()
| 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 () => { |
no outgoing calls
no test coverage detected