Skip to content

Commit

Permalink
Update FetchInstanceMetadataService.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid authored Oct 27, 2023
1 parent bf96617 commit a4178f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/core/FetchInstanceMetadataService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class FetchInstanceMetadataService {
@bindThis
public async tryLock(host: string): Promise<boolean> {
const mutex = await this.redisClient.set(`fetchInstanceMetadata:mutex:${host}`, '1', 'EX', 60 * 5, 'NX');
return mutex === 'OK';
return !!mutex;
}

@bindThis
Expand Down

0 comments on commit a4178f7

Please sign in to comment.