To process the first payload without revision_number we could potentially make the comparison
if orig and orig.get('revision_number', -1) >= payload.get('revision_number', 0): return True
So if the orig is empty or revision_number is zero (First time) We still process the first message and not discard it. I tested this
+ if orig.get('revision_number', 0) > payload.get('revision_number', 0):
in production this didn't cause any issues.
To process the first payload without revision_number we could potentially make the comparison
if orig and orig.get( 'revision_ number' , -1) >= payload. get('revision_ number' , 0):
return True
So if the orig is empty or revision_number is zero (First time) We still process the first message and not discard it. I tested this
+ if orig.get( 'revision_ number' , 0) > payload. get('revision_ number' , 0):
in production this didn't cause any issues.