Skip to content
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

List Activatable Workers on startup #288

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

subpop
Copy link
Collaborator

@subpop subpop commented Jan 15, 2025

When the Dispatcher connects, find all activatable workers instead of only active/running workers. This will include workers that are installed but that have not yet started.

Card ID: CCT-862

@jirihnidek
Copy link
Contributor

@subpop When I start yggdrasil.service from this PR, then all installed yggdrasil workers are automatically started. This could have unintentional side-effect of high consumption of memory and other resources. I believe that worker should be started only in situation, when it is needed.

When the Dispatcher connects, find all activatable workers instead of
only active/running workers. This will include workers that are
installed but that have not yet started.

Card ID: CCT-862
The worker discovery goroutine gets the “Features” property of each worker it discovers. This has a side effect of starting each bus-activatable worker if it was not started already. Instead of rapidly spawning each discovered worker just to probe the “Features” property, check first if the worker is running. A worker is assumed to be running if the result of ‘org.freedesktop.DBus.NameHasOwner’ is true. In this case, get the Features property and include it in the directives map; otherwise include the worker with an empty features table.
@subpop subpop force-pushed the yggd-worker-discovery branch from 226dc83 to 04f6c2d Compare January 22, 2025 17:33
@subpop subpop requested a review from jirihnidek January 22, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants