Skip to content
Snippets Groups Projects

Support feature worker declaration from gitlab.teklia.com

Merged Valentin Rigal requested to merge teklia-workers into release-1.7.1
All threads resolved!
1 file
+ 4
3
Compare changes
  • Side-by-side
  • Inline
@@ -147,8 +147,6 @@ class Command(BaseCommand):
self.stdout.write("Creating new worker version")
max_version = worker.versions.aggregate(max_version=Max("version"))["max_version"] or 0
if configuration.get("docker") is None and docker_command:
configuration["docker"] = {"command": docker_command}
worker_version = worker.versions.create(
docker_image_iid=docker_image,
feature=feature,
@@ -259,4 +257,7 @@ class Command(BaseCommand):
if worker is not None:
self.update_feature_from_worker(feature, **worker)
else:
self.update_feature(feature, **feature_config)
configuration = {}
if (command := feature_config["command"]):
configuration["docker"] = {"command": command}
self.update_feature(feature, **feature_config, configuration=configuration)
Loading