You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would require 5 separate deliveries for 5 events though. EG: if it's triggered during student enrollment, the webhook will disable after the 5th student fails enrollment.
This is problematic if an external application relies on webhook deliveries to maintain data integrity in the external application.
We should automatically reschedule a failed webhook delivery on a delay (5-15 minutes? Possibly it should track individual event failures and increase the delay: failure 1, wait 5 minutes, resend; failure 2 wait 30 minutes and resend; etc...)
After failure, we can check whether the webhook should be disabled and, if not, we can reschedule it using the same args passed into the deliver() method:
Our concerns would be around network and/or server issues on our end. Network would be the primary, server would normally just be a scheduled restart or an OS update. Network could be a power outage which could be an extended outage which could take hours to restore << which suggests that we consider cloud hosting, understood. >> If it could extend out to 12 or 24 hours max for the retry, we should be good in almost any case. Simplistic store and forward, I know. But a significant impact on pseudo-guaranteed delivery and associated data integrity. Interested in your thoughts regarding what the practical maximum would be.
Interested in your thoughts regarding what the practical maximum would be.
That's really going to depend on the requirements of your application. I think a "safe" method for the default with a simplistic option to reconfigure those defaults on a per-application need using hooks and filters is the best bet.
LifterLMS can't solve every potential need or requirement so doing something generally safe/appropriate as the default with the ability to customize when the defaults don't make sense is our approach to just about everything.
Currently our webhooks are set to track failed attempts and automatically disable after 5 failed delivery attempts:
lifterlms-rest/includes/abstracts/class-llms-rest-webhook-data.php
Lines 289 to 321 in 9215df2
This would require 5 separate deliveries for 5 events though. EG: if it's triggered during student enrollment, the webhook will disable after the 5th student fails enrollment.
This is problematic if an external application relies on webhook deliveries to maintain data integrity in the external application.
We should automatically reschedule a failed webhook delivery on a delay (5-15 minutes? Possibly it should track individual event failures and increase the delay: failure 1, wait 5 minutes, resend; failure 2 wait 30 minutes and resend; etc...)
After failure, we can check whether the webhook should be disabled and, if not, we can reschedule it using the same args passed into the
deliver()
method:lifterlms-rest/includes/models/class-llms-rest-webhook.php
Line 39 in 6bb9b04
In order to best track failures for the specific event we could probably just add an extra argument to the args array:
The text was updated successfully, but these errors were encountered: