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
Add extractor key and owner email param support #39
Conversation
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.
can you add a changelog entry as well.
pyclowder/extractors.py
Outdated
connector.connect() | ||
connector.register_extractor(self.args.registration_endpoints) | ||
|
||
# TODO: register extractor initially without _process_message? |
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.
how is this different from the register_extractor
also I like to move away from this in the future.
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.
register_extractor registers with arg-specified endpoints, while this is a generic registration with the clowder instance in clowder_url (if not already registered there). this would allow extractor_info to not have registration_urls, but auto-register with Clowder. i was having trouble registering with just RMQ heartbeats in my test environment, but maybe this is unnecessary...
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.
can you update changelog
@@ -519,8 +519,12 @@ def register_extractor(self, endpoints): | |||
|
|||
for url in endpoints.split(','): | |||
if "unique_key" in data: | |||
if url.find("?") > -1: url += "&user=%s" % self.clowder_email | |||
else: url += "?user=%s" % self.clowder_email # TODO: This will not work, need an auth key matching email | |||
if url.find("?") > -1: |
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.
what if this is the first parameter?
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.
if the config has specified a registration URL without an API key, registering privately with just an email address won't be accepted. so it doesn't send the request.
Co-authored-by: Rob Kooper <kooper@illinois.edu>
Co-authored-by: Rob Kooper <kooper@illinois.edu>
…amework/pyclowder into extractor-key-support
Related to clowder-framework/clowder#300
add -e EXTRACTOR_KEY and -e CLOWDER_EMAIL to pyclowder extractors to register an initial user and unique key.