Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Great Refactor (part I): make SMS handling actually manageable
- Messages now get shoved into the DB before anything else, meaning we never drop 'em on the floor. (fixes #14) - SMS->Matrix handling has been completely reworked. Now, we create a UserManager (through the RecipientFactory) for each phone number, which can be prodded in order to make it get messages from the DB and deliver them. (fixes #13) - Message delivery is now actually failure-tolerant as well! We do an exponential backoff for failures to deliver. - We now do regular CMGLs if configured, and also if an earlier one failed to work completely. This can be configured with the cmgl_secs value in the configuration. (fixes #8) - Modems without CNMI support now work with the above polling mechanism. - We now use newer versions of glitch-in-the-matrix and huawei-modem.
- Loading branch information
Showing
13 changed files
with
711 additions
and
267 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE messages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE TABLE messages ( | ||
id SERIAL PRIMARY KEY, | ||
recipient_id INT REFERENCES recipients ON DELETE CASCADE, | ||
pdu bytea NOT NULL, | ||
processing BOOL NOT NULL DEFAULT false, | ||
failures INT NOT NULL DEFAULT 0 | ||
); |
Oops, something went wrong.