Browse Source

Fix compile lock.

master
t123yh 7 years ago
parent
commit
66c09cf8b6
  1. 2
      src/daemon/judge/compile.ts
  2. 2
      src/daemon/redis.ts

2
src/daemon/judge/compile.ts

@ -28,6 +28,6 @@ export async function compile(
}
return [fingerprint, result];
} finally {
unlock();
await unlock();
}
}

2
src/daemon/redis.ts

@ -12,7 +12,7 @@ Bluebird.promisifyAll(redis.Multi.prototype);
const redisClient = redis.createClient(Cfg.redis, { detect_buffers: true }) as any;
// We use one client for now, cluster support to be added later.
const redlock = new Redlock([redisClient], {
retryCount: 0,
retryCount: 50,
retryDelay: 100
// retryJitter: 100
});

Loading…
Cancel
Save