conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
150 stars 50 forks source link

Respect worker log level config setting #903

Closed soapy1 closed 1 month ago

soapy1 commented 1 month ago

Description

This small PR updates the conda store worker to respect the CondaStoreWorker.log_level config parameter. Now users can see that the log level set for their works gets applied to the worker.

Pull request checklist

How to test

Before this change, the worker was always running at logger.INFO log level. For example, you can see in the log output

. . .
conda-store-worker-1  | [2024-10-19 01:41:55,960: INFO/MainProcess] Connected to redis://:**@redis:6379/0
conda-store-worker-1  | [2024-10-19 01:41:55,962: WARNING/MainProcess] /opt/conda/envs/conda-store-server/lib/python3.12/site-packages/celery/worker/consumer/consumer.py:508: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine

To test this add the following line to your conda-store config file

c.CondaStoreWorker.log_level = logging.ERROR

Restart the server and view the logs. Notice that the WARN and INFO log lines no longer appear in the logs.

netlify[bot] commented 1 month ago

Deploy Preview for conda-store canceled.

Name Link
Latest commit a752f6de5d827a55c085b7b2d05e45deb263ae23
Latest deploy log https://app.netlify.com/sites/conda-store/deploys/671310639769830008fe9f84
netlify[bot] commented 1 month ago

Deploy Preview for conda-store canceled.

Name Link
Latest commit 04fe23a4f2e24cf52ec95399c79b43ea005ea963
Latest deploy log https://app.netlify.com/sites/conda-store/deploys/67166ab97f126100083bd23e
peytondmurray commented 1 month ago

Confirmed after talking with @viniciusdc that this should be safe to do. Thanks!