Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Make houdini submissions respect pools groups #10

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions client/ayon_core/modules/deadline/plugins/publish/collect_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,22 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin,
"harmony"
"nuke",
"maya",
"max"]
"max",
"houdini"]

families = ["render",
"rendering",
"render.farm",
"renderFarm",
"renderlayer",
"maxrender"]
"maxrender",
"usdrender",
"redshift_rop",
"arnold_rop",
"mantra_rop",
"karma_rop",
"vray_rop",
"publish.hou"]

primary_pool = None
secondary_pool = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ class HoudiniCacheSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
targets = ["local"]

priority = 50
chunk_size = 999999
group = None
jobInfo = {}
pluginInfo = {}
group = None


def get_job_info(self):
job_info = DeadlineJobInfo(Plugin="Houdini")
Expand Down Expand Up @@ -88,7 +90,7 @@ def get_job_info(self):

attr_values = self.get_attr_values_from_data(instance.data)

job_info.ChunkSize = instance.data["chunkSize"]
job_info.ChunkSize = instance.data.get("chunk_size", self.chunk_size)
job_info.Comment = context.data.get("comment")
job_info.Priority = attr_values.get("priority", self.priority)
job_info.Group = attr_values.get("group", self.group)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from ayon_core.lib import (
is_in_tests,
BoolDef,
TextDef,
NumberDef
)

Expand Down Expand Up @@ -79,16 +80,21 @@ class HoudiniSubmitDeadline(
use_published = True

# presets
priority = 50
chunk_size = 1
export_priority = 50
export_chunk_size = 10
group = ""
export_group = ""

priority = 50
chunk_size = 1
group = ""

@classmethod
def get_attribute_defs(cls):
return [
BoolDef(
"suspend_publish",
default=False,
label="Suspend publish"
),
NumberDef(
"priority",
label="Priority",
Expand All @@ -103,10 +109,15 @@ def get_attribute_defs(cls):
minimum=1,
maximum=1000
),
TextDef(
"group",
default=cls.group,
label="Group Name"
),
NumberDef(
"export_priority",
label="Export Priority",
default=cls.priority,
default=cls.export_priority,
decimals=0
),
NumberDef(
Expand All @@ -117,11 +128,11 @@ def get_attribute_defs(cls):
minimum=1,
maximum=1000
),
BoolDef(
"suspend_publish",
default=False,
label="Suspend publish"
)
TextDef(
"export_group",
default=cls.export_group,
label="Export Group Name"
),
]

def get_job_info(self, dependency_job_ids=None):
Expand Down Expand Up @@ -163,15 +174,6 @@ def get_job_info(self, dependency_job_ids=None):
job_info.UserName = context.data.get(
"deadlineUser", getpass.getuser())

if split_render_job and is_export_job:
job_info.Priority = attribute_values.get(
"export_priority", self.export_priority
)
else:
job_info.Priority = attribute_values.get(
"priority", self.priority
)

if is_in_tests():
job_info.BatchName += datetime.now().strftime("%d%m%Y%H%M%S")

Expand All @@ -192,15 +194,23 @@ def get_job_info(self, dependency_job_ids=None):

job_info.Pool = instance.data.get("primaryPool")
job_info.SecondaryPool = instance.data.get("secondaryPool")
job_info.Group = self.group

if split_render_job and is_export_job:
job_info.Priority = attribute_values.get(
"export_priority", self.export_priority
)
job_info.ChunkSize = attribute_values.get(
"export_chunk", self.export_chunk_size
)
job_info.Group = self.export_group
else:
job_info.Priority = attribute_values.get(
"priority", self.priority
)
job_info.ChunkSize = attribute_values.get(
"chunk", self.chunk_size
)
job_info.Group = self.group

job_info.Comment = context.data.get("comment")

Expand Down
51 changes: 51 additions & 0 deletions server_addon/deadline/server/settings/publish_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,32 @@ class HarmonySubmitDeadlineModel(BaseSettingsModel):
department: str = SettingsField(title="Department")


class HoudiniSubmitDeadlineModel(BaseSettingsModel):
"""Houdini deadline render submitter settings."""
enabled: bool = SettingsField(title="Enabled")
optional: bool = SettingsField(title="Optional")
active: bool = SettingsField(title="Active")

priority: int = SettingsField(title="Priority")
chunk_size: int = SettingsField(title="Chunk Size")
group: str = SettingsField(title="Group")

export_priority: int = SettingsField(title="Export Priority")
export_chunk_size: int = SettingsField(title="Export Chunk Size")
export_group: str = SettingsField(title="Export Group")


class HoudiniCacheSubmitDeadlineModel(BaseSettingsModel):
"""Houdini deadline cache submitter settings."""
enabled: bool = SettingsField(title="Enabled")
optional: bool = SettingsField(title="Optional")
active: bool = SettingsField(title="Active")

priority: int = SettingsField(title="Priority")
chunk_size: int = SettingsField(title="Chunk Size")
group: str = SettingsField(title="Group")


class AfterEffectsSubmitDeadlineModel(BaseSettingsModel):
"""After Effects deadline submitter settings."""

Expand Down Expand Up @@ -332,6 +358,12 @@ class PublishPluginsModel(BaseSettingsModel):
HarmonySubmitDeadline: HarmonySubmitDeadlineModel = SettingsField(
default_factory=HarmonySubmitDeadlineModel,
title="Harmony Submit to deadline")
HoudiniCacheSubmitDeadline: HoudiniCacheSubmitDeadlineModel = SettingsField(
default_factory=HoudiniCacheSubmitDeadlineModel,
title="Houdini Submit cache to deadline")
HoudiniSubmitDeadline: HoudiniSubmitDeadlineModel = SettingsField(
default_factory=HoudiniSubmitDeadlineModel,
title="Houdini Submit render to deadline")
MaxSubmitDeadline: MaxSubmitDeadlineModel = SettingsField(
default_factory=MaxSubmitDeadlineModel,
title="Max Submit to deadline")
Expand Down Expand Up @@ -416,6 +448,25 @@ class PublishPluginsModel(BaseSettingsModel):
"group": "",
"department": ""
},
"HoudiniCacheSubmitDeadline": {
"enabled": True,
"optional": False,
"active": True,
"priority": 50,
"chunk_size": 999999,
"group": ""
},
"HoudiniSubmitDeadline": {
"enabled": True,
"optional": False,
"active": True,
"priority": 50,
"chunk_size": 1,
"group": "",
"export_priority": 50,
"export_chunk_size": 10,
"export_group": ""
},
"MaxSubmitDeadline": {
"enabled": True,
"optional": False,
Expand Down
2 changes: 1 addition & 1 deletion server_addon/deadline/server/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.9"
__version__ = "0.1.10"