-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not skip the Notification but send it after one hour #33
Comments
To clarify, you would want a sequence such as this, assuming a max rate of 1/hour (
There is a possibility that this could result in a large backlog of really old notifications, if for example multiple notifications were sent within an hour. Would you have some cap or limit at which point notifications really would be skipped to avoid this? Example of the problem:
... and so on. In such a case, MyNotification 4 is actually delayed more than 2 hours before being delivered. Perhaps that is fine, but if multiple of these notifications keep coming every hour, you may never catch up and wind up being consistently several hours behind. But perhaps I have misunderstood, or perhaps for your use case that isn't likely to happen. Have I understood what you are asking, though? |
@tibbsa you are right. in this case the Notification 2 , 3 and 4 should be skips and the last one before the hour complete should be send. any idea , how can i achieve this ? |
If it were just a matter of deferring, then we could (subject to limitation no. 1 below) use deferred/delayed queueing to accomplish this. However, there are two limitations:
Taken together, the better approach would likely be to use a database-backed 'holding pen' for deferred notifications before actually shipping them to the queue for sending. Let think about this approach - and whether this is too big a leap for this package, or whether we can just provide the 'recipe' for how to do this in your app, etc. |
@noreengulappelit I have given this some thought, and think it is a bit beyond what we should add to this package specifically, given that it would require a means of storing notifications, etc. and the specifics of that will be very application-dependent. However, I have added some additional context and information to the See https://github.com/tibbsa/lnrl_deferral_example/ for a sample implementation. The (very atomic) commits were added to the repo in an order that should make it easy to follow how this was built up. If you are trying to replicate this right away, you will need to use a composer repository override (see the |
I want to send notification after one hour , if it is send before one hour then send it after one hour. don't skip it
The text was updated successfully, but these errors were encountered: