Ver Fonte

SQLite no concurrency limit should only be effective if the db backend is used.

Ask Solem há 15 anos atrás
pai
commit
6c856e5012
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      celery/bin/celeryd.py

+ 3 - 1
celery/bin/celeryd.py

@@ -198,7 +198,9 @@ def run_worker(concurrency=DAEMON_CONCURRENCY, detach=False,
     if not concurrency:
     if not concurrency:
         concurrency = multiprocessing.cpu_count()
         concurrency = multiprocessing.cpu_count()
 
 
-    if settings.DATABASE_ENGINE == "sqlite3" and concurrency > 1:
+    if conf.CELERY_BACKEND == "database" \
+            and settings.DATABASE_ENGINE == "sqlite3" and \
+            concurrency > 1:
         import warnings
         import warnings
         warnings.warn("The sqlite3 database engine doesn't support "
         warnings.warn("The sqlite3 database engine doesn't support "
                 "concurrency. We'll be using a single process only.",
                 "concurrency. We'll be using a single process only.",