2h -> 1h
This commit is contained in:
1 parent
08d53b80b7
commit
caca71dce5
7 files changed
+12
-10
No files matched your search
@@ -242,7 +242,7 @@ class MonitorService implements IMonitorService {
|
||||
private getStartDate(range: string): Date {
|
||||
const now = new Date();
|
||||
switch (range) {
|
||||
case "2h":
|
||||
case "1h":
|
||||
return new Date(now.getTime() - 2 * 60 * 60 * 1000);
|
||||
case "24h":
|
||||
return new Date(now.getTime() - 24 * 60 * 60 * 1000);
|
||||
@@ -587,7 +587,9 @@ class MonitorService implements IMonitorService {
|
||||
}
|
||||
);
|
||||
|
||||
const checks = await Check.aggregate(pipeline);
|
||||
const checks = await Check.aggregate(pipeline)
|
||||
.allowDiskUse(true)
|
||||
.hint({ "metadata.monitorId": 1, createdAt: 1 });
|
||||
|
||||
// Get monitor stats
|
||||
const monitorStats = await MonitorStats.findOne({
|
||||
|
||||
Reference in new issue
Block a user