mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
✌️
This commit is contained in:
parent
634fb6ab9b
commit
08d2324bb0
@ -1,13 +1,15 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user