소스 검색

Negate test for available os.fork (thanks miracle2k)

Ask Solem 15 년 전
부모
커밋
c5821c5506
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      celery/loaders/__init__.py

+ 2 - 1
celery/loaders/__init__.py

@@ -14,7 +14,8 @@ Loader = DefaultLoader
 if settings.configured:
     Loader = DjangoLoader
 else:
-    if callable(getattr(os, "fork", None)): # Platform doesn't support fork()
+    if not callable(getattr(os, "fork", None)):
+        # Platform doesn't support fork()
         # XXX On systems without fork, multiprocessing seems to be launching
         # the processes in some other way which does not copy the memory
         # of the parent process. This means that any configured env might