Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5312 from ynput/bugfix/deadline_submit_context
Browse files Browse the repository at this point in the history
  • Loading branch information
64qam authored Jul 17, 2023
2 parents 7c16d89 + 7c0466d commit 8445fa3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 9 additions & 0 deletions openpype/modules/deadline/plugins/publish/collect_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,21 @@ def process(self, instance):
instance.data["primaryPool"] = (
attr_values.get("primaryPool") or self.primary_pool or "none"
)
if instance.data["primaryPool"] == "-":
instance.data["primaryPool"] = None

if not instance.data.get("secondaryPool"):
instance.data["secondaryPool"] = (
attr_values.get("secondaryPool") or self.secondary_pool or "none" # noqa
)

if instance.data["secondaryPool"] == "-":
instance.data["secondaryPool"] = None

self.log.info("prima::{}".format(instance.data["primaryPool"]))
self.log.info(
"secondaryPool::{}".format(instance.data["secondaryPool"]))

@classmethod
def get_attribute_defs(cls):
# TODO: Preferably this would be an enum for the user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def _submit_deadline_post_job(self, instance, job, instances):
deepcopy(instance.data["anatomyData"]),
instance.data.get("asset"),
instances[0]["subset"],
instance.context,
'render',
override_version
)
Expand Down Expand Up @@ -523,8 +524,8 @@ def process(self, instance):
json.dump(publish_job, f, indent=4, sort_keys=True)

def _get_publish_folder(self, anatomy, template_data,
asset, subset,
family='render', version=None):
asset, subset, context,
family, version=None):
"""
Extracted logic to pre-calculate real publish folder, which is
calculated in IntegrateNew inside of Deadline process.
Expand All @@ -550,7 +551,7 @@ def _get_publish_folder(self, anatomy, template_data,
based on 'publish' template
"""

project_name = self.context.data["projectName"]
project_name = context.data["projectName"]
if not version:
version = get_last_version_by_subset_name(
project_name,
Expand All @@ -563,7 +564,7 @@ def _get_publish_folder(self, anatomy, template_data,
version = 1

template_data["subset"] = subset
template_data["family"] = "render"
template_data["family"] = family
template_data["version"] = version

render_templates = anatomy.templates_obj["render"]
Expand Down

0 comments on commit 8445fa3

Please sign in to comment.