diff --git a/config.yaml b/config.yaml index e57728c..592d0e2 100755 --- a/config.yaml +++ b/config.yaml @@ -4,8 +4,8 @@ service: response_formatter: default # formats analysis payloads of response messages upload_formatter: projecting # formats analysis payloads of objects uploaded to storage # Note: This is not really the right place for this. It should be configured on a per-service basis. - operation: default -# operation: image_classification # FIXME: operation needs to be specified in deployment config for services that are called without an operation specified + operation: $OPERATION|default + # operation needs to be specified in deployment config for services that are called without an operation specified operations: conversion: input: diff --git a/pyinfra/component_factory.py b/pyinfra/component_factory.py index 85727b1..02697b1 100644 --- a/pyinfra/component_factory.py +++ b/pyinfra/component_factory.py @@ -107,6 +107,8 @@ class ComponentFactory: @lru_cache(maxsize=None) def get_operation2file_patterns(self): + if self.config.service.operation is not "default": + self.config.service.operations["default"] = self.config.service.operations[self.config.service.operation] return self.config.service.operations @lru_cache(maxsize=None)