Browse Source

Merge pull request #3788 from getsentry/bugfix/date-concurrency

Workaround for a concurrency bug with date parsing
Armin Ronacher 8 years ago
parent
commit
36d0536847
2 changed files with 7 additions and 0 deletions
  1. 6 0
      src/sentry/runner/__init__.py
  2. 1 0
      src/sentry/wsgi.py

+ 6 - 0
src/sentry/runner/__init__.py

@@ -11,8 +11,14 @@ import os
 import click
 import sys
 import sentry
+import datetime
 from sentry.utils.imports import import_string
 
+
+# We need to run this here because of a concurrency bug in Python's locale
+# with the lazy initialization.
+datetime.datetime.strptime('', '')
+
 # Parse out a pretty version for use with --version
 if sentry.__build__ is None:
     version_string = sentry.VERSION

+ 1 - 0
src/sentry/wsgi.py

@@ -11,6 +11,7 @@ import os
 import os.path
 import sys
 
+
 # Add the project to the python path
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))