Skip to content

Conversation

@thompson318
Copy link
Collaborator

@thompson318 thompson318 commented Dec 11, 2025

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.

@thompson318 thompson318 linked an issue Dec 11, 2025 that may be closed by this pull request
2 tasks
@thompson318 thompson318 marked this pull request as ready for review December 11, 2025 10:20
return f"{datestring}.{csn}.{sourceSystem}.{units}.csv"
units = units.replace("/", "p")
units = units.replace("%", "percent")
return f"{datestring}.{csn}.{sourceStreamId}.{units}.csv"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return f"{datestring}.{csn}.{sourceStreamId}.{units}.csv"
// Will need to remove CSN from the pseudonymised version!
return f"{datestring}.{csn}.{sourceStreamId}.{units}.csv"

Copy link
Collaborator Author

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
Comment on lines 80 to 81
obs_time_str = observation_time.strftime("%Y-%m-%d:%H:%M:%S")
start_time_str = start_time.strftime("%Y-%m-%d:%H:%M:%S")
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with 9a8be8b

@thompson318
Copy link
Collaborator Author

I couldn't get this worked reliably. Superceded by #24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants