-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if worker is initialized #705
Merged
nkaretnikov
merged 11 commits into
conda-incubator:main
from
nkaretnikov:check-worker-605
Jan 27, 2024
Merged
Check if worker is initialized #705
nkaretnikov
merged 11 commits into
conda-incubator:main
from
nkaretnikov:check-worker-605
Jan 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for kaleidoscopic-dango-0cf31d canceled.
|
nkaretnikov
commented
Dec 13, 2023
nkaretnikov
commented
Dec 13, 2023
nkaretnikov
commented
Dec 13, 2023
nkaretnikov
added
area: configuration
status: in progress 🏗
area: user experience 👩🏻💻
Items impacting the end-user experience
labels
Dec 15, 2023
nkaretnikov
force-pushed
the
check-worker-605
branch
2 times, most recently
from
December 15, 2023 17:56
a64f818
to
a9a02bb
Compare
nkaretnikov
commented
Dec 16, 2023
nkaretnikov
commented
Dec 16, 2023
nkaretnikov
commented
Dec 18, 2023
nkaretnikov
force-pushed
the
check-worker-605
branch
from
December 18, 2023 22:19
f5aaa22
to
f30d2fa
Compare
dcmcand
suggested changes
Jan 5, 2024
nkaretnikov
force-pushed
the
check-worker-605
branch
from
January 20, 2024 12:44
3dfca34
to
ed595af
Compare
nkaretnikov
commented
Jan 20, 2024
@dcmcand Please take a look! Summary of changes:
|
dcmcand
approved these changes
Jan 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Thanks @nkaretnikov
dcmcand
added
status: merge ready 🚀
and removed
status: in progress 🏗
needs: review 👀
labels
Jan 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: configuration
area: user experience 👩🏻💻
Items impacting the end-user experience
project: challenges
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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