Skip to content

Commit

Permalink
Merge pull request #36 from ynput/bugfix/staging-job-fix
Browse files Browse the repository at this point in the history
Publish jobs respect staging mode
  • Loading branch information
iLLiCiTiT authored Sep 25, 2024
2 parents 0d8d3b1 + 120c616 commit a831b40
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def _submit_deadline_post_job(self, instance, job, instances):
metadata_path, rootless_metadata_path = \
create_metadata_path(instance, anatomy)

settings_variant = os.environ["AYON_DEFAULT_SETTINGS_VARIANT"]
environment = {
"AYON_PROJECT_NAME": instance.context.data["projectName"],
"AYON_FOLDER_PATH": instance.context.data["folderPath"],
Expand All @@ -207,9 +208,7 @@ def _submit_deadline_post_job(self, instance, job, instances):
"AYON_RENDER_JOB": "0",
"AYON_REMOTE_PUBLISH": "0",
"AYON_BUNDLE_NAME": os.environ["AYON_BUNDLE_NAME"],
"AYON_DEFAULT_SETTINGS_VARIANT": (
os.environ["AYON_DEFAULT_SETTINGS_VARIANT"]
),
"AYON_DEFAULT_SETTINGS_VARIANT": settings_variant,
}

# add environments from self.environ_keys
Expand All @@ -227,8 +226,12 @@ def _submit_deadline_post_job(self, instance, job, instances):
'publish',
'"{}"'.format(rootless_metadata_path),
"--targets", "deadline",
"--targets", "farm"
"--targets", "farm",
]
# TODO remove when AYON launcher respects environment variable
# 'AYON_DEFAULT_SETTINGS_VARIANT'
if settings_variant == "staging":
args.append("--use-staging")

# Generate the payload for Deadline submission
secondary_pool = (
Expand Down

0 comments on commit a831b40

Please sign in to comment.