Content
View differences
Updated by Jens Ulferts about 2 years ago
The `CreateDateAlertNoficationsJob` is triggered (one per user per day - at least it should be) by the `Notifications::ScheduleDateAlertsNotificationsJob` and its service. That job runs every 15 mins trying to find all users who's timestamp is currently 1am locally.
The `Notifications::ScheduleDateAlertsNotificationsJob` is governed by a Cron-Like feature of GoodJob.
What I have been pondering about is whether the expectation of having one `CreateDateAlertNoficationsJob` per user is actually true in situations where the backend is already under higher load. Because the `Notifications::ScheduleDateAlertsNotificationsJob` job will check for when it was scheduled to run and compare that to when it is actually run and have all the time zones where it is 1am locally between the two boundaries be addressed.
Nowadays I would check what happens there exactly. It will depend on how good job handles this. I believe that with DelayedJob, there where never two schedule jobs in the queue as a job would be put in the queue by its predecessor. From what I have seen with <mention class="mention" data-id="4710" data-type="user" data-text="@Markus Kahl">@Markus Kahl</mention> I have the suspicion that GoodJob handles this differently. And if that means that there can be more than one Schedule job in the queue at the same time, than every job instance should only care for its 15 minutes.
The `Notifications::ScheduleDateAlertsNotificationsJob` is governed by a Cron-Like feature of GoodJob.
What I have been pondering about is whether the expectation of having one `CreateDateAlertNoficationsJob` per user is actually true in situations where the backend is already under higher load. Because the `Notifications::ScheduleDateAlertsNotificationsJob` job will check for when it was scheduled to run and compare that to when it is actually run and have all the time zones where it is 1am locally between the two boundaries be addressed.
Nowadays I would check what happens there exactly. It will depend on how good job handles this. I believe that with DelayedJob, there where never two schedule jobs in the queue as a job would be put in the queue by its predecessor. From what I have seen with <mention class="mention" data-id="4710" data-type="user" data-text="@Markus Kahl">@Markus Kahl</mention> I have the suspicion that GoodJob handles this differently. And if that means that there can be more than one Schedule job in the queue at the same time, than every job instance should only care for its 15 minutes.