Closed nkaretnikov closed 5 months ago
Name | Link |
---|---|
Latest commit | 1863ec04ab7aef201be7de245d170eb12d09efcb |
Latest deploy log | https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/65abf0a47d1b2500087bb149 |
Tested this on Linux and Windows. Example output from Windows (server and worker are running in separate terminals):
@dcmcand Please take a look!
Summary of changes:
Fixes #605.
Description
conda-store can run via docker and in standalone mode:
--standalone
CLI parameter must be used to start the worker sub-processHowever, there might be cases where users forget to pass the
--standalone
parameter when running in standalone mode. This is a problem because the server cannot execute any tasks without the worker, so it must be running.This PR adds a check that verifies whether the worker is running and prints an error message if not.
The worker is configured via a number of parameters, like
celery_broker_url
, which can either point to a database connection or use Redis:Similarly, checks like
conda_store.celery_app.control.inspect().ping()
won't work outside of Redis and RabbitMQ.So we use a database entry to check whether the worker is initialized. The database is used because it will work regardless of parameters used to configure the worker.
Example output:
The warning message is printed in red, the info message is printed in green.
The simplest way to test this:
The commands to run from
conda-store/conda-store-server
:To test in standalone mode (also starts the worker):
To test via docker:
Pull request checklist
Additional information