Skip to content
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

S3 key timestamp #9

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion aggrec/aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def get_new_aggregate_event_message(

def get_s3_object_key(metadata: AggregateMetadata) -> str:
"""Get S3 object key from metadata"""
dt = metadata.aggregate_interval_start or metadata.id.generation_time
dt = metadata.id.generation_time
dt = dt.astimezone(tz=timezone.utc)
fields_dict = {
"type": metadata.aggregate_type.name.lower(),
Expand All @@ -181,6 +181,7 @@ def get_s3_object_key(metadata: AggregateMetadata) -> str:
"day": f"{dt.day:02}",
"hour": f"{dt.hour:02}",
"minute": f"{dt.minute:02}",
"second": f"{dt.second:02}",
"creator": metadata.creator,
"id": metadata.id,
}
Expand Down
Loading