Explorar el Código

Fix get_fdmax on Windows

Ask Solem hace 11 años
padre
commit
2de5a2357d
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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