Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Mar 4, 2024
1 parent 64a563f commit 6f0cd45
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fixbackend/subscription/aws_marketplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async def subscribed(self, user: User, token: str) -> Tuple[SubscriptionMethod,
log.info(f"AWS Marketplace subscription for user {user.email} with token {token}")
# Get the related data from AWS. Will throw in case of an error.
customer_data = self.marketplace_client.resolve_customer(RegistrationToken=token)
log.debug(f"AWS Marketplace user {user.email} got customer data: {customer_data}")
log.info(f"AWS Marketplace user {user.email} got customer data: {customer_data}")
product_code = customer_data["ProductCode"]
customer_identifier = customer_data["CustomerIdentifier"]
customer_aws_account_id = customer_data["CustomerAWSAccountId"]
Expand All @@ -136,7 +136,9 @@ async def subscribed(self, user: User, token: str) -> Tuple[SubscriptionMethod,

# only create a new subscription if there is no existing one
if existing := await self.subscription_repo.aws_marketplace_subscription(user.id, customer_identifier):
log.debug(f"AWS Marketplace user {user.email}: return existing subscription")
log.info(
f"AWS Marketplace user {user.email}: return existing subscription, user_id: {existing}, customer_identifier: {customer_identifier}"
)
return existing, workspace_assigned
else:
subscription = AwsMarketplaceSubscription(
Expand Down

0 comments on commit 6f0cd45

Please sign in to comment.