Skip to content

Commit

Permalink
keydb互換性
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid authored Oct 27, 2023
1 parent 20a4166 commit 2eba6da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/backend/src/core/FetchInstanceMetadataService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ 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', 'GET');
const mutex = await this.redisClient.set(`fetchInstanceMetadata:mutex:${host}`, '1', 'NX', 'GET');
await this.redisClient.expire(`fetchInstanceMetadata:mutex:${host}`, 60 * 5, 'NX');
return mutex !== '1';
}

Expand Down

0 comments on commit 2eba6da

Please sign in to comment.