Skip to content

Commit

Permalink
fix: update file lock function usage
Browse files Browse the repository at this point in the history
  • Loading branch information
NeuralFlux committed Nov 5, 2024
1 parent 23d3010 commit e12cba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class TRAPIQueryHandler {
if (this.options.smartapi) {
smartapiRegistry = this.options.smartapi;
} else {
smartapiRegistry = await lockWithActionAsync(this.path, async () => {
smartapiRegistry = await lockWithActionAsync([this.path], async () => {
const file = await fs.readFile(this.path, 'utf-8');
const hits = JSON.parse(file);
return hits;
Expand Down Expand Up @@ -127,7 +127,7 @@ export default class TRAPIQueryHandler {

const metaKG = new MetaKG(this.path, this.predicatePath);
debug(`SmartAPI Specs read from path: ${this.path}`);
metaKG.constructMetaKGSync(this.includeReasoner, this.options);
await metaKG.constructMetaKGWithFileLock(this.includeReasoner, this.options);
return metaKG;
}

Expand Down

0 comments on commit e12cba4

Please sign in to comment.