mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
set default metrics to zero
This commit is contained in:
parent
4cad18f51c
commit
63bddf13a1
1 changed files with 6 additions and 6 deletions
|
|
@ -87,13 +87,13 @@ export const getMetrics = async (
|
|||
|
||||
return {
|
||||
// convert to integer
|
||||
started: parseInt(metrics.started, 10),
|
||||
invalid: parseInt(metrics.invalid, 10),
|
||||
imported: parseInt(metrics.imported, 10),
|
||||
failed: parseInt(metrics.failed, 10),
|
||||
total: parseInt(metrics.total, 10),
|
||||
started: parseInt(metrics.started, 10) || 0,
|
||||
invalid: parseInt(metrics.invalid, 10) || 0,
|
||||
imported: parseInt(metrics.imported, 10) || 0,
|
||||
failed: parseInt(metrics.failed, 10) || 0,
|
||||
total: parseInt(metrics.total, 10) || 0,
|
||||
source: metrics.source,
|
||||
state: parseInt(metrics.state, 10),
|
||||
state: parseInt(metrics.state, 10) || ImportTaskState.STARTED,
|
||||
startTime: parseInt(metrics.start_time, 10),
|
||||
endTime: parseInt(metrics.end_time, 10),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue