Merge pull request #2310 from omnivore-app/fix/importer-metrics-collector

fix taskId not being set in the cloud task payload
This commit is contained in:
Hongbo Wu
2023-06-05 18:25:48 +08:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@ -109,6 +109,7 @@ const importURL = async (
labels: labels?.map((l) => {
return { name: l }
}),
taskId,
})
}

View File

@ -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),
}