-
Notifications
You must be signed in to change notification settings - Fork 265
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
Subscripton status "failed" is a crafted (not real in DB/cache) status #3989
Comments
Moreover, the |
IMHO failed/ok condition is totally orthogonal to active/inactive condition. For example, if notification pass to inactive after several times trying to send the notification as proposed in #3962, It is needed to know about the status of the subscription (inactive) and also about the status of the notification (failed), to identify the real situation. If the condition |
Using milliseconds for lastNotification/lastFailure/lastSuccess has been considered in issue #3671 |
So +1 to option 2 I guess :) |
Note that So if we go for option 2 or 3 we have to take this into consideration (eg. documenting this deviation from the spec) |
The description of status in doc/manuals/admin/database_model.md could need to be fixed depending on how this issue gets solved:
|
At the end we are going to implement option 3:
At the same can be achieved just checking new field |
PR #4006 |
Currently we have this in Subscrpition::toJson() rendering logic:
Thus,
failed
is not a real status coming from csubs document/cache.This is a bit weird, but I'm not sure which should be do. Some alternatives:
failed
in DB/cache as any other status (active
,inactive
, etc.). That would simplify the rendering logic in Subscription::toJson() but involve dealing with setingfailed
in the proper place (in the code dealing with notification fails). Another more difficult to solve problem of "conceptual" kind is how to deal with some status transition situation, e.g. a subscription that is infailed
status can be changed toactive
taking into account we don't have information about if the situation that make it to fail has disappeared?"failed": true|false
. Thus,"status": "active", "failed": true
will clearly identify that a subscription is active (i.e. updates will trigger notifications) and, at the same time, last notification caused a fail.failed
at all. The user may infer if the subscription is failling or not based in lastNotification/lastFailure/lastSuccess information, basically doing himself the same checking we currently have in the if-clause above.Feedback welcome! :)
The text was updated successfully, but these errors were encountered: