Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Chuck Daniels <[email protected]>
Co-authored-by: Ciaran Sweet <[email protected]>
  • Loading branch information
3 people authored Nov 21, 2024
1 parent 147ca34 commit 7d01666
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions integration_tests/test_link_push_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def recent_event_s2_created() -> dict:
/ "data"
/ "push-granule-created-s2-n1.json"
)
with data.open() as src:
payload = json.load(src)
payload = json.loads(data.read_text())

# Update relevant parts of message payload to be "recent"
# where recent is <30 days from today as we're not currently
Expand Down
2 changes: 1 addition & 1 deletion lambdas/link_fetcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ links to downloadable Sentinel products,
* Subscriptions API ("event based")

We wish to migrate from a polling to an event driven method of link
fetchiung. During the transition period, this subdirectory handles both
fetching. During the transition period, this subdirectory handles both
of these methods and deploys them as two separate Lambda functions. This
README describes both forms of link fetching.

Expand Down
2 changes: 1 addition & 1 deletion lambdas/link_fetcher/manage_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def main(
if command == "create":
if subscriptions:
click.echo(
"Cannot create a second subscriptions (only 1 active is allowed)"
"Cannot create a second subscription (only 1 active is allowed)"
)
raise click.Abort()
subscription = subscription_api.create_subscription()
Expand Down
2 changes: 1 addition & 1 deletion lambdas/link_fetcher/tests/test_subscription_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def event_s2_created() -> dict:
def recent_event_s2_created(event_s2_created: dict) -> dict:
"""A "recent" Sentinel-2 "Created" event from ESA's push subscription
We freezse time
We freeze time
"""
# freeze to same day as publication date
with freeze_time(event_s2_created["value"]["PublicationDate"]):
Expand Down

0 comments on commit 7d01666

Please sign in to comment.