mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Clean up return signature
This commit is contained in:
parent
d8a5ed42e8
commit
fd57e075d7
1 changed files with 3 additions and 3 deletions
|
|
@ -97,12 +97,12 @@ const checkShouldPauseQueues = async () => {
|
|||
0
|
||||
) / ts.points.length
|
||||
if (avgLatency > LATENCY_THRESHOLD) {
|
||||
return [true, avgLatency]
|
||||
return { shouldPauseQueues: true, avgLatency: avgLatency }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [false, 0]
|
||||
return { shouldPauseQueues: false, avgLatency: 0 }
|
||||
}
|
||||
|
||||
const getQueueTaskCount = async (queueName: string) => {
|
||||
|
|
@ -143,7 +143,7 @@ async function checkMetricsAndPauseQueues() {
|
|||
throw new Error('environment not supplied.')
|
||||
}
|
||||
|
||||
const [shouldPauseQueues, avgLatency] = await checkShouldPauseQueues()
|
||||
const { shouldPauseQueues, avgLatency } = await checkShouldPauseQueues()
|
||||
|
||||
if (shouldPauseQueues) {
|
||||
let rssQueueCount: number | string = 'unknown'
|
||||
|
|
|
|||
Loading…
Reference in a new issue