Skip to content

Instantly share code, notes, and snippets.

@dgtm
Created September 4, 2012 05:44
Show Gist options
  • Save dgtm/3617231 to your computer and use it in GitHub Desktop.
Save dgtm/3617231 to your computer and use it in GitHub Desktop.
SH
Phase I
First PDF is uploaded and it is sent to Sidekiq.
If Sidekiq dies and it remains in the Q Backlog infinitely, what do we do?
App precodes: rotates, crops, creates decodings
Failures here are retried thrice, if no success, send email to us and SureWire
Do this yourself / App Error has occurred
Tests are scanned for integrity
Emails are sent for no tests, incomplete test set, unidentified pages and processable pages
Phase II
Tests are sent for verification
A redis stat is added that this document and test is incomplete
CF sending logic
Failures here are logged inside exceptions and we get an email. The job is retried by Sidekiq by deleteing everything and starting from Phase I Step II again. Sidekiq sends an email if it is unsuccessful thrice.
Phase III
Notifications are received
Result construction
If any errors occur, it is registered in Exceptions and sent to us as email.
We must sent a client notification here #TODO
Verification Tests
No match occurs for SH and name:
We dont immediately send an email. #TODO
After x hours, our poller will track if this document has passed time limit and email SureHire to process all tests
A match occurs
We start sending secondary pages
If test is sent for digitization, we will add redis stats that this test is incomplete.
If this fails, job is retried but it is not idempotent. So, we may receive multiple notifications. After 3 retries, Sidekiq fails and Client notification is sent. #TODO Decide email format
Phase IV
Notifications are received
Same as Phase III
#TODO send an email to client if exception occurs.
But, since medical tests are going to be independent for posting in future, we have to send this message per test if exception occurs while result processing
If no error occurs,
We post result to SureWire, removing the redis stat that this test is incomplete.
If post fails, after 3 retries, we dont send the email inmediately. Test Poller handles it.
Pollers
Document Poller (Every 10 minutes)
Poller used to look for incomplete documents, it is being changed to look for incomplete tests. If time of any of these documents has crossed x hours, we send a notification email. #TODO check format of this email.
Every 4 hours, new updates to things like Technician name are pulled for all tests.
Every 20 minutes, SureWire Live and Staging are synced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment