Repository navigation
Conversation
Services can call self.subscribe to subscribe to a queue of recipe messages, with acknowledgement and recipe ID log extension enabled by default. The queue name can be overridden from the service's environment dictionary, which the service starter fills from a new --queue [NAME=]QUEUE option and the WORKFLOWS_QUEUE environment variable. Command line options take precedence over the variable. The option is only added if the starter's subclass has not already defined -q or --queue, so existing subclasses keep working.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
So far overridable queue names have only existed on a subset of manually implemented dlstbx services e.g. dlstbx.services.per_image_analysis.
This centralises all of what was previously
to
with defaults set to match the common settings (Everything can still be overridden).
This also implements a universal mechanism for overriding the queue -
ServiceStarter(used byzocalo.goanddlstbx.go) now adds it's own--queueargument (unless the caller already has their own). If this is set, or if the service "environment" dictionary has aqueue/queuesentry, or if theWORKFLOWS_QUEUEenvironment variable is set, then it will replace the defaults subscribed queue under the following rules:queuename=newnamewill replace the queue name if it matches exactly. Multiple entries can be space- or comma- separated.newnamewill replace the queue name only if the service subscribes to one (non-broadcast) queue - if a second queue is connected then an error will be raised.-q/--queue [NAME=]QUEUEcan be passed multiple times to any frontend usingServiceStarter.