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

ioc: fix dbLoadGroups command. #91

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

Conversation

ericonr
Copy link
Contributor

@ericonr ericonr commented Nov 22, 2024

Calling GroupConfigProcessor().loadConfigFiles() reads and clears config.groupConfigFiles, and loads the JSON files before iocInit. When loadConfigFiles() is called again from an init-hook, config.groupConfigFiles is empty, and no JSON files are actually read, so no groups in those files are loaded.

This change removes error messages at the point where dbLoadGroup is called; errors are now displayed only during iocInit.


Fixes #88

I would like to add tests before merging this. Done!

I think I mostly understood what caused this problem, but I couldn't find where config.groupMap is cleared before/during iocInit, so I didn't understand why loadConfigFiles() before iocInit was an issue.

I'm assuming groupConfigFiles is cleared by std::move (this seems to be a correct assumption), but if there's some spot that simply clears the whole config, it might simply be cleared along with groupMap.

Calling GroupConfigProcessor().loadConfigFiles() reads and clears
config.groupConfigFiles, and loads the JSON files before iocInit. When
loadConfigFiles() is called again from an init-hook,
config.groupConfigFiles is empty, and no JSON files are actually read,
so no groups in those files are loaded.

This change removes error messages at the point where dbLoadGroup is
called; errors are now displayed only during iocInit.
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.

QSRV groups aren't created when loaded with dbLoadGroups in .cmd file
1 participant