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

Update handler to be global if INSTANTIATE_LAMBDA_HANDLER_ON_IMPORT=True #1096

Merged
merged 3 commits into from
Jan 6, 2022

Conversation

chiangf
Copy link
Contributor

@chiangf chiangf commented Dec 24, 2021

INSTANTIATE_LAMBDA_HANDLER_ON_IMPORT was introduced in #982 but I'm noticing an error UnboundLocalError: local variable 'handler' referenced before assignment if I set the env var, which I believe is because handler needs to be global.

zappa/handler.py Outdated Show resolved Hide resolved
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 73.529% when pulling ca4b5fb on chiangf:master into 86a471c on zappa:master.

Copy link
Member

@javulticat javulticat left a comment

Choose a reason for hiding this comment

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

Thanks!

@javulticat javulticat merged commit 465773a into zappa:master Jan 6, 2022
Ian288 pushed a commit to tackle-io/Zappa that referenced this pull request Jul 11, 2023
…rue (zappa#1096)

* Update handler to be global if INSTANTIATE_LAMBDA_HANDLER_ON_IMPORT=True

* Replace global

Co-authored-by: Frank Chiang <chiangf@@users.noreply.github.com>
Co-authored-by: javulticat <31746850+javulticat@users.noreply.github.com>
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.

3 participants