fix(api): resolve lint errors
This commit is contained in:
1 parent
96fede9fe5
commit
fd1fa2366c
42 files changed
+307
-199
No files matched your search
@@ -215,7 +215,7 @@ export class RiotJobQueueService {
|
||||
|
||||
public async promoteDueScheduledJobs(limit = 100): Promise<number> {
|
||||
const client = this.redisService.raw();
|
||||
const raw = (await client.sendCommand([
|
||||
const entries = await client.sendCommand<string[]>([
|
||||
'ZRANGEBYSCORE',
|
||||
RIOT_JOB_SCHEDULED_ZSET,
|
||||
'-inf',
|
||||
@@ -223,16 +223,15 @@ export class RiotJobQueueService {
|
||||
'LIMIT',
|
||||
'0',
|
||||
String(limit),
|
||||
])) as string[] | null;
|
||||
const entries = raw ?? [];
|
||||
]);
|
||||
let promoted = 0;
|
||||
|
||||
for (const entry of entries) {
|
||||
const removed = (await client.sendCommand([
|
||||
const removed = await client.sendCommand<number>([
|
||||
'ZREM',
|
||||
RIOT_JOB_SCHEDULED_ZSET,
|
||||
entry,
|
||||
])) as number;
|
||||
]);
|
||||
if (removed !== 1) continue;
|
||||
const job = this.parseScheduledJob(entry);
|
||||
if (!job) continue;
|
||||
|
||||
Reference in new issue
Block a user