|
I wonder, if we actually should do this rather for 2.0, where migration will cause much less pain (as it is expected).
Once AGPUSH-1512 is in, servedVariants < totalVariants ==> PENDING will be reliable and so sufficient.
What we could do is exposing a "sugar" on REST API - determine state by comparing serverVariants < totalVariants and derive an enum value from that, where:
class enum Status {
|
PENDING, // servedVariants < totalVariants
|
FAILED, // if one of the batches failed to be delivered
|
SUCCEDED // otherwise
|
Right now, we do this comparison on frontend, which is imo not best way to do this: https://github.com/aerogear/aerogear-unifiedpush-server/pull/671/files#diff-56d902dea65a46a24b5c981ab5ddb1e0R20
|