Browse Source

Fix get_fdmax on Windows

Ask Solem 11 năm trước cách đây
mục cha
commit
2de5a2357d
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      celery/platforms.py

+ 2 - 0
celery/platforms.py

@@ -87,6 +87,8 @@ def get_fdmax(default=None):
                       descriptor limit.
 
     """
+    if resource is None:  # Windows
+        return default
     fdmax = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
     if fdmax == resource.RLIM_INFINITY:
         return default