mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-25 15:55:57 +03:00
[GH-ISSUE #237] Setting the number of retries for a message #173
Labels
No labels
Bug report
Code improvement
Concern
Feature request
Feature request
Good first issue to work on
In progress
Needs info
Question
Ready
Translation
User Experience
User Experience
Website
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SMSSync#173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sorinpohontu on GitHub (Jan 24, 2015).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/237
Originally assigned to: @eyedol on GitHub.
When sending a message and it will fail for various reasons, the message will be in Pending state for a undefined number of retries.
I'm thinking about adding in Settings a new variable for Number of retries for a message.
After specified number of retries is reached, the message should be deleted from Pending state.
Also, if "Message Results API" is enabled, it should respond to server in order to set it as Error and stop processing further.
@sorinpohontu commented on GitHub (Feb 17, 2015):
Additional note: If the message fails, it should be send only once and after that, let the Message API (server side) to retry the message, if needed.
In this way, the logic in SMSSync should be easier to implement.
Looking forward for feedback.
@eyedol commented on GitHub (Feb 23, 2015):
@sorinpohontu what will make the app not send the SMS? Wrong formatted phone number? There would be some edge cases where the phone number is correctly formatted but doesn't exist. If it's wrong formatted, I can just drop attempt at sending a SMS to it.
@sorinpohontu commented on GitHub (Feb 23, 2015):
There might be various reasons:
SMSSync will need to:
Looking forward to hear from you.
@eyedol commented on GitHub (Mar 3, 2015):
Still WIP. This is a tricky one because of the way we process SMSs. Still working on it.
@sorinpohontu commented on GitHub (Mar 3, 2015):
Adding a new field in table 'messages', let's say message_no_of_retries would help.
After that, for send it's a just a simple query to select messages with
message_no_of_retries<= Preferences.no_of_retries. After send, message_no_of_retries should be incremented and it will be not processed on next send.In Message Result API, messages with message_no_of_retries >= Preferences.no_of_retries should be returned as not delivered (maybe a JOIN with sent_messages).
Please let me know if you need more info.
Looking forward to hear from you.
@eyedol commented on GitHub (Apr 20, 2015):
@sorinpohontu could you confirm this is fixed in v2.8.0-rc.1?
@sorinpohontu commented on GitHub (Apr 20, 2015):
@eyedol Seems to work as expected, but I'll have to double check tomorrow and get back to you.
@sorinpohontu commented on GitHub (Apr 21, 2015):
Settings: "No. of retries for pending message" = Three tries.
Actually, the message is sent 5 times. Can you recheck ?
@eyedol commented on GitHub (Apr 21, 2015):
How many messages were in the queue? They got deleted after the 5th retries?
@sorinpohontu commented on GitHub (Apr 21, 2015):
2 Messages, 1 correct and 1 wrong. The wrong message was deleted from Pending after 5th retry.
I've made another test with a single message in the queue, and the failed message has also 5 retries.