-
Notifications
You must be signed in to change notification settings - Fork 1
16 blocking with threading #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ing a new connection for each message. Added nack messages for some failures
| return f"{datestring}.{csn}.{sourceSystem}.{units}.csv" | ||
| units = units.replace("/", "p") | ||
| units = units.replace("%", "percent") | ||
| return f"{datestring}.{csn}.{sourceStreamId}.{units}.csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return f"{datestring}.{csn}.{sourceStreamId}.{units}.csv" | |
| // Will need to remove CSN from the pseudonymised version! | |
| return f"{datestring}.{csn}.{sourceStreamId}.{units}.csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an issue for this #6, so I think it's not necessary to add a comment to code as well.
src/db.py
Outdated
| obs_time_str = observation_time.strftime("%Y-%m-%d:%H:%M:%S") | ||
| start_time_str = start_time.strftime("%Y-%m-%d:%H:%M:%S") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal but I'd expect the pg driver to accept datetime objects as parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with 9a8be8b
…xhaust the connections.
…tched csn file so we don't lose data yet'
|
I couldn't get this worked reliably. Superceded by #24. |
Fixes #16 by putting the callback in a separate thread, so main thread can still get/send heartbeat to keep pika alive.
Fixes #17 by replacing characters in units string. (Also adds a unit test for this)
Adds some logic to send nack to rabbitMQ on some failures. This partially address #19 but may need more testing to find all failure modes.
Also updates the SQL to find the correct patients based on location visit times. This seems to be working on the GAE currently (subject to #20).
Limitations: most of the code does not have associated tests (low coverage) but it is tested by running on the GAE currently.