Skip to content

lazyinit aws_sns_client#2012

Merged
ccostino merged 25 commits intomainfrom
lazyinit2
Oct 7, 2025
Merged

lazyinit aws_sns_client#2012
ccostino merged 25 commits intomainfrom
lazyinit2

Conversation

@terrazoon
Copy link
Contributor

@terrazoon terrazoon commented Oct 6, 2025

Description

We use gevent in conjunction with celery. This requires a lot of monkey patching and the monkey patching has to be applied to everything. Including the big complicated, resource-heavy global variables that we were statically initializing in app/init.py. So do lazy initialization of AwsSnsClient and Encryption.

Security Considerations

N/A

@terrazoon terrazoon marked this pull request as draft October 6, 2025 14:54
@terrazoon terrazoon marked this pull request as ready for review October 7, 2025 17:25
Copy link
Contributor

@ccostino ccostino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to go, thanks @terrazoon!

@ccostino ccostino merged commit 8444c93 into main Oct 7, 2025
7 checks passed
@ccostino ccostino deleted the lazyinit2 branch October 7, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants