diff --git a/conda-store-server/conda_store_server/worker/app.py b/conda-store-server/conda_store_server/worker/app.py index 24c7a5470..e51a7df4d 100644 --- a/conda-store-server/conda_store_server/worker/app.py +++ b/conda-store-server/conda_store_server/worker/app.py @@ -71,9 +71,18 @@ def start(self): argv = [ "worker", "--loglevel=INFO", - "--beat", ] + # The default Celery pool requires this on Windows. See + # https://stackoverflow.com/questions/37255548/how-to-run-celery-on-windows + if sys.platform == "win32": + os.environ.setdefault('FORKED_BY_MULTIPROCESSING', '1') + else: + # --beat does not work on Windows + argv += [ + "--beat", + ] + if self.concurrency: argv.append(f"--concurrency={self.concurrency}")