Skip to content

Conversation

@mitsuhiko
Copy link
Contributor

@mitsuhiko mitsuhiko commented Jul 25, 2016

This is needed because otherwise sometimes we fail parsing timestamps
that would otherwise be valid. Mostly happens after interpreter
startup if there are multiple threads doing stuff.

@getsentry/infrastructure


This change is Reviewable

@mitsuhiko mitsuhiko force-pushed the bugfix/date-concurrency branch from 86791d1 to 02ace8d Compare July 25, 2016 13:27
@mattrobenolt
Copy link
Contributor

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@mattrobenolt
Copy link
Contributor

I TRUST IN YOU ARMIN

@mattrobenolt
Copy link
Contributor

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


src/sentry/wsgi.py, line 18 [r1] (raw file):

We need to run this here because of a concurrency bug in Python's locale

with the lazy initialization.

datetime.datetime.strptime('', '')

Should we put this in runner/__init__.py instead? This code is only run for the wsgi interface, so it won't get applied for say, async workers or other standalone scripts. But runner/__init__.py is executed for everything.


Comments from Reviewable

@mitsuhiko
Copy link
Contributor Author

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


src/sentry/wsgi.py, line 18 [r1] (raw file):

Previously, mattrobenolt (Matt Robenolt) wrote…

We need to run this here because of a concurrency bug in Python's locale

with the lazy initialization.

datetime.datetime.strptime('', '')

Should we put this in runner/__init__.py instead? This code is only run for the wsgi interface, so it won't get applied for say, async workers or other standalone scripts. But runner/__init__.py is executed for everything.

Done.

Comments from Reviewable

@dcramer
Copy link
Member

dcramer commented Jul 30, 2016

Reviewed 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


Comments from Reviewable

@mitsuhiko mitsuhiko merged commit 36d0536 into master Aug 5, 2016
@mitsuhiko mitsuhiko deleted the bugfix/date-concurrency branch August 5, 2016 20:27
mattrobenolt pushed a commit that referenced this pull request Aug 8, 2016
Workaround for a concurrency bug with date parsing
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants