Move the resolve_execution_environment method to the mixin class

so that it can be used with AdHocCommands as well.
This commit is contained in:
Jeff Bradberry
2020-11-20 14:08:11 -05:00
committed by Shane McDonald
parent 8562c378c0
commit 4993a9e6ec
4 changed files with 24 additions and 20 deletions

View File

@@ -887,6 +887,9 @@ class BaseTask(object):
return os.path.abspath(os.path.join(os.path.dirname(__file__), *args))
def build_execution_environment_params(self, instance):
if instance.execution_environment_id is None:
self.update_model(instance.pk, execution_environment=instance.resolve_execution_environment())
image = instance.execution_environment.image
params = {
"container_image": image,