Notif stats to cron process
This commit is contained in:
parent
33c68001c2
commit
cdc3bbdd5b
1 changed files with 5 additions and 2 deletions
|
|
@ -67,12 +67,15 @@ Meteor.startup(() => {
|
|||
return sched;
|
||||
},
|
||||
job: () => {
|
||||
Notifications.find({ nofitied: null, type: 'mobile' }).forEach((notif) => {
|
||||
const mobileNotif = Notifications.find({ nofitied: null, type: 'mobile' });
|
||||
mobileNotif.forEach((notif) => {
|
||||
processNotif(notif);
|
||||
});
|
||||
Notifications.find({ emailNofitied: null, type: 'web' }).forEach((notif) => {
|
||||
const emailNotif = Notifications.find({ emailNofitied: null, type: 'web' });
|
||||
emailNotif.forEach((notif) => {
|
||||
processNotif(notif);
|
||||
});
|
||||
return { mobile: mobileNotif.count(), web: emailNotif.count() };
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue