Skip to content

Commit

Permalink
🐛 update cache onUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
elmarti committed Oct 16, 2021
1 parent 1e4b42d commit 20437ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/modules/persistence/fs/fs-persistence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@ export default class FSPersistence implements IPersistenceAdapter {
return this.cache;
}
async update(updated:any): Promise<void> {


await this.queue.add(async () => {
this.logger.log(LogLevel.Debug, `Writing file`);
await this.fs.writeData(this.outputPath, this.collectionName, updated);
})

this.cache = updated;
})
}

/**
Expand Down

0 comments on commit 20437ec

Please sign in to comment.