forked from FoundKeyGang/FoundKey
✌️
This commit is contained in:
parent
e166ad6780
commit
763676a18c
1 changed files with 5 additions and 3 deletions
|
@ -1,13 +1,15 @@
|
||||||
import Note from './models/note';
|
import Note from './models/note';
|
||||||
|
|
||||||
|
const interval = 5000;
|
||||||
|
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
const [all, local] = await Promise.all([Note.count({
|
const [all, local] = await Promise.all([Note.count({
|
||||||
createdAt: {
|
createdAt: {
|
||||||
$gte: new Date(Date.now() - 3000)
|
$gte: new Date(Date.now() - interval)
|
||||||
}
|
}
|
||||||
}), Note.count({
|
}), Note.count({
|
||||||
createdAt: {
|
createdAt: {
|
||||||
$gte: new Date(Date.now() - 3000)
|
$gte: new Date(Date.now() - interval)
|
||||||
},
|
},
|
||||||
'_user.host': null
|
'_user.host': null
|
||||||
})]);
|
})]);
|
||||||
|
@ -17,4 +19,4 @@ setInterval(async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
process.send(stats);
|
process.send(stats);
|
||||||
}, 3000);
|
}, interval);
|
||||||
|
|
Loading…
Reference in a new issue