hotfix - #62
Conversation
|
small fixes that will 1) make the json uploader robust to missing document ids, 2) have oura parser record webhook event times in CST for interpretability, 3) fix accidental '.json.json' at the end of webhook time files |
TomekFraczek
left a comment
There was a problem hiding this comment.
This looks mostly really nice, but I'm a bit confused about what you're doing with the document_ids
| this_id = doc.get(self.target_location['doc_id_key']) | ||
| if this_id is None: | ||
| self.warning(f"Skipping existing record without {self.target_location['doc_id_key']} in {target_file}") | ||
| continue |
There was a problem hiding this comment.
What types of data don't have doc ids?
There was a problem hiding this comment.
I was encountering problems where the doc id was named incorrectly, but yeah I think this can be deleted. was mostly for debugging.
| "doc_type": self.event_track_datatype, # "webhook_times" | ||
| "date": payload_out["date"], # same day grouping | ||
| "document_id": timestamp_clean, # unique per webhook file (good enough) | ||
| "id": f"{object_id}_{event_time_local}", # unique per webhook file (good enough) |
There was a problem hiding this comment.
Do you not still need a document ID to uniquely identify the data file you're trying to fetch from Oura
There was a problem hiding this comment.
yes, i'm just changing the name from document_id to id to make it consistent across oura documents, and I'm making it more unique. before it was causing problems
TomekFraczek
left a comment
There was a problem hiding this comment.
LGTM, thanks for explaining things!
fix inconsistent filename handling in webhook_times