SimpleSequenceGenerator accepts starting sequence when object is created#121
SimpleSequenceGenerator accepts starting sequence when object is created#121nikoladsp wants to merge 1 commit intopython-smpplib:masterfrom
Conversation
…eated.Test file also created Signed-off-by: Nikola Radovanovic <nikoladsp@gmail.com>
|
Don't you think this kind of behavior is actually somewhat misleading? I think It would be better to raise |
|
It depends on usage. For example, I am storing sequence in the DB and want to continue where I left off, since using sequence to "mark" received messages and remove them from the DB. "Ring" kind of update is suitable for this usage, or at least I think so. Kindest regards |
|
Yes, probably you are right about the most common use case here, but the code allows for example ridiculously large or negative numbers to be slightly ignored and replaced with default value. |
|
Hiya! I'm not in favour of silently changing a parameter value, this is usually makes debugging harder. I'd rather go for one of these:
|
|
Hi, Well be in touch. Cheers |
SimpleSequenceGenerator accepts starting sequence when object is created (default is MIN_SEQUENCE) .Test file also created
Signed-off-by: Nikola Radovanovic nikoladsp@gmail.com