소스 검색

Default pool on PyPy 1.5+ is now multiprocessing

Ask Solem 14 년 전
부모
커밋
ce9e21ff1f
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      celery/app/defaults.py

+ 5 - 1
celery/app/defaults.py

@@ -9,7 +9,11 @@ DEFAULT_POOL = "processes"
 if is_jython:
     DEFAULT_POOL = "threads"
 elif is_pypy:
-    DEFAULT_POOL = "solo"
+    if sys.pypy_version_info[0:3] < (1, 5, 0):
+        DEFAULT_POOL = "solo"
+    else:
+        DEFAULT_POOL = "processes"
+
 
 DEFAULT_PROCESS_LOG_FMT = """
     [%(asctime)s: %(levelname)s/%(processName)s] %(message)s