Skip to content

Commit

Permalink
Merge pull request #183 from planetarium/bugfix/iap-voucher
Browse files Browse the repository at this point in the history
Fix CDK bugs
  • Loading branch information
U-lis authored Dec 4, 2023
2 parents f23ecfb + ac4fa5a commit 0104c2d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iap/api/purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def request_product(receipt_data: ReceiptSchema, sess=Depends(session)):
resp = sqs.send_message(QueueUrl=VOUCHER_SQS_URL,
MessageBody=json.dumps({
"id": receipt.id,
"uuid": receipt.uuid,
"uuid": str(receipt.uuid),
"product_id": receipt.product_id,
"product_name": receipt.product.name,
"agent_addr": receipt.agent_addr,
Expand Down
10 changes: 9 additions & 1 deletion worker/worker_cdk_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
runtime=_lambda.Runtime.PYTHON_3_10,
code=_lambda.AssetCode("worker/worker", exclude=exclude_list),
handler="status_monitor.handle",
environment=env,
layers=[layer],
role=role,
vpc=shared_stack.vpc,
Expand All @@ -172,7 +173,14 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
runtime=_lambda.Runtime.PYTHON_3_10,
code=_lambda.AssetCode("worker/worker", exclude=exclude_list),
handler="voucher.handle",

layers=[layer],
role=role,
vpc=shared_stack.vpc,
timeout=cdk_core.Duration.seconds(30),
memory_size=512,
events=[
_evt_src.SqsEventSource(shared_stack.voucher_q)
],
)

# Golden dust by NCG handler
Expand Down

0 comments on commit 0104c2d

Please sign in to comment.