Skip to content

Commit 8cd97ba

Browse files
committed
fix lint
1 parent f4371b8 commit 8cd97ba

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

core/check-completion.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const configRedis = require('../config/redis');
44
class CheckCompletion {
55
constructor() {
66
this.options = {
7-
host: configRedis.auxRedisHost,
8-
port: configRedis.auxRedisPort,
7+
host: configRedis.auxRedisHost,
8+
port: configRedis.auxRedisPort,
99
};
1010
}
1111

1212
async increment(
13-
key
13+
key,
1414
) {
1515
const redis = new Redis(
1616
this.options,
@@ -24,22 +24,22 @@ class CheckCompletion {
2424
}
2525

2626
async decrement(
27-
key
27+
key,
2828
) {
2929
const redis = new Redis(
3030
this.options,
3131
);
3232
const luaScript = `
33-
local count = redis.call('DECR', KEYS[1])
34-
return count
33+
local count = redis.call('DECR', KEYS[1])
34+
return count
3535
`;
3636

3737
const result = await redis.eval(luaScript, 1, key);
3838
if (result === 0) {
39-
console.log('Last job completed.');
40-
await redis.del(key);
39+
console.log('Last job completed.');
40+
await redis.del(key);
4141
} else {
42-
console.log(`Jobs remaining: ${result}`);
42+
console.log(`Jobs remaining: ${result}`);
4343
}
4444
return result;
4545
}

0 commit comments

Comments
 (0)