public storePerformanceStatistics(performanceStatistics: Statistics): void {
this.checkPerformanceRecordsFile();
- const asyncLock = AsyncLock.getInstance(AsyncLockType.performance);
- asyncLock
- .acquire()
+ AsyncLock.acquire(AsyncLockType.performance)
.then(() => {
const fileData = fs.readFileSync(this.dbName, 'utf8');
const performanceRecords: Statistics[] = fileData
);
})
.finally(() => {
- asyncLock.release().catch(Constants.EMPTY_FUNCTION);
+ AsyncLock.release(AsyncLockType.performance).catch(Constants.EMPTY_FUNCTION);
});
}