Skip to content
Snippets Groups Projects
Commit 763676a1 authored by syuilo's avatar syuilo
Browse files

✌️

parent e166ad67
No related branches found
No related tags found
No related merge requests found
import Note from './models/note';
const interval = 5000;
setInterval(async () => {
const [all, local] = await Promise.all([Note.count({
createdAt: {
$gte: new Date(Date.now() - 3000)
$gte: new Date(Date.now() - interval)
}
}), Note.count({
createdAt: {
$gte: new Date(Date.now() - 3000)
$gte: new Date(Date.now() - interval)
},
'_user.host': null
})]);
......@@ -17,4 +19,4 @@ setInterval(async () => {
};
process.send(stats);
}, 3000);
}, interval);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment