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

Databroker v1 interface used #204

Open
clintonroy opened this issue Dec 31, 2021 · 2 comments
Open

Databroker v1 interface used #204

clintonroy opened this issue Dec 31, 2021 · 2 comments

Comments

@clintonroy
Copy link

I'm attempting to setup a mongo backed catalog, and followed the doc, producing a v2 configuration.

It appears that the queueserver worker uses a v1 only access method Broker.named() to find a catalog.

I'm not 100% sure, but I think if queueserver used the databroker.catalog['config'] v2 api, that would work for v1 and v2 databroker config files?

I think I can work around this by using a v1 mongodb configuration, without much/any loss in functionality. I'm mostly just grumpy I've followed the doc and hit my head.

Happy to do a PR if the above is the right way to go.

@dmgav
Copy link
Contributor

dmgav commented Jan 2, 2022

I would suggest to define RE and db in startup code, subscribe RE to db and start RE Manager with option --keep-re. This way you are not limited to built-in Queue Server options and you can subscribe RE to as many standard or custom callbacks as you need. Initially we had an idea to implement some small set of universal subscriptions sufficient for all workflows in the Queue Server code, but now it does not seem achievable. There is also push for higher flexibility from beamline staff. My current view is that the internal options for instantiation and configuration of RE will be used mostly for demos and all practical beamline applications will have RE defined and configured in startup code. This is the way we do it at the beamlines that are using the Queue Server.

Note that RE (mandatory) and db (optional) are reserved names of the objects that should be defined in global namespace of the startup script:

if self._config_dict["keep_re"]:
# Copy references from the namespace
self._RE = self._re_namespace["RE"]
self._db = self._re_namespace.get("db", None)

In my opinion we should change the built-in initialization code to Databroker V2 API, but we may not be ready to use V2 in basic tutorials.

@clintonroy
Copy link
Author

Thank you for the response. I figured I'd eventually have to go down this route. I'm happy enough to close this ticket, unless you want the reminder around.

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

No branches or pull requests

2 participants