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

Fix async genkey logging #2772

Merged
merged 1 commit into from
Dec 31, 2017

Conversation

tmc
Copy link
Contributor

@tmc tmc commented Dec 30, 2017

Status

Ready for review.

Description of Changes

This skips calling current_app which is invalid to do from a separate thread (which async_genkey runs in).

Fixes #2609.

Testing

CI

Deployment

N/A

Checklist

N/A

@tmc tmc requested a review from a user December 30, 2017 23:18
@tmc tmc changed the title WIP: Fix async genkey logging Fix async genkey logging Dec 30, 2017
in Flask, current_app is a werkzeug LocalProxy which uses thread (or
greenlet) local storage. Since async_genkey runs in another thread it's
invalid to call it in this manner.
@tmc
Copy link
Contributor Author

tmc commented Dec 31, 2017

This failure appears to be a flake, can someone re-run?

Copy link
Contributor

@redshiftzero redshiftzero left a comment

Choose a reason for hiding this comment

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

Excellent catch, thanks @tmc. Approved for merge

@redshiftzero redshiftzero merged commit 32061bc into freedomofpress:develop Dec 31, 2017
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.

None yet

2 participants