Fix workers.activity_report should return 0s for the time when no workers reported

This commit is contained in:
allegroai
2023-11-17 09:49:18 +02:00
parent e713e876eb
commit e08123fcc0
2 changed files with 28 additions and 35 deletions

View File

@@ -215,6 +215,10 @@ class WorkerStats:
"date_histogram": {
"field": "timestamp",
"fixed_interval": f"{interval}s",
"extended_bounds": {
"min": int(from_date) * 1000,
"max": int(to_date) * 1000,
}
},
"aggs": {"workers_count": {"cardinality": {"field": "worker"}}},
}