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

Deadline: Remove legacy suspend_publish attribute definition in favor of publishJobState #315

Merged
merged 8 commits into from
May 6, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
from ayon_core.pipeline.publish import (
AYONPyblishPluginMixin
)
from ayon_core.lib import (
BoolDef,
NumberDef,
)
from ayon_core.lib import NumberDef


class FusionSubmitDeadline(
Expand Down Expand Up @@ -64,11 +61,6 @@ def get_attribute_defs(cls):
decimals=0,
minimum=1,
maximum=10
),
BoolDef(
"suspend_publish",
default=False,
label="Suspend publish"
)
]

Expand All @@ -80,10 +72,6 @@ def process(self, instance):
attribute_values = self.get_attr_values_from_data(
instance.data)

# add suspend_publish attributeValue to instance data
instance.data["suspend_publish"] = attribute_values[
"suspend_publish"]

context = instance.context

key = "__hasRun{}".format(self.__class__.__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
from ayon_core.lib import (
is_in_tests,
BoolDef,
TextDef,
NumberDef
)
Expand Down Expand Up @@ -90,11 +89,6 @@ class HoudiniSubmitDeadline(
@classmethod
def get_attribute_defs(cls):
return [
BoolDef(
"suspend_publish",
default=False,
label="Suspend publish"
),
NumberDef(
"priority",
label="Priority",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ def get_attribute_defs(cls):
default=cls.use_gpu,
label="Use GPU"
),
BoolDef(
"suspend_publish",
default=False,
label="Suspend publish"
),
BoolDef(
"workfile_dependency",
default=cls.workfile_dependency,
Expand All @@ -100,10 +95,6 @@ def process(self, instance):
instance.data["attributeValues"] = self.get_attr_values_from_data(
instance.data)

# add suspend_publish attributeValue to instance data
instance.data["suspend_publish"] = instance.data["attributeValues"][
"suspend_publish"]

families = instance.data["families"]

node = instance.data["transientData"]["node"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ def _submit_deadline_post_job(self, instance, job):

instance_settings = self.get_attr_values_from_data(instance.data)
initial_status = instance_settings.get("publishJobState", "Active")
# TODO: Remove this backwards compatibility of `suspend_publish`
if instance.data.get("suspend_publish"):
initial_status = "Suspended"

args = [
"--headless",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
hosts = ["fusion", "max", "maya", "nuke", "houdini",
"celaction", "aftereffects", "harmony", "blender"]

families = ["render.farm", "render.frames_farm",
"prerender.farm", "prerender.frames_farm",
"renderlayer", "imagesequence",
families = ["render", "render.farm", "render.frames_farm",
"prerender", "prerender.farm", "prerender.frames_farm",
"renderlayer", "imagesequence", "image",
"vrayscene", "maxrender",
"arnold_rop", "mantra_rop",
"karma_rop", "vray_rop",
Expand Down Expand Up @@ -224,9 +224,6 @@ def _submit_deadline_post_job(self, instance, job, instances):

instance_settings = self.get_attr_values_from_data(instance.data)
initial_status = instance_settings.get("publishJobState", "Active")
# TODO: Remove this backwards compatibility of `suspend_publish`
if instance.data.get("suspend_publish"):
initial_status = "Suspended"

args = [
"--headless",
Expand Down Expand Up @@ -314,7 +311,6 @@ def _submit_deadline_post_job(self, instance, job, instances):

return deadline_publish_job_id


def process(self, instance):
# type: (pyblish.api.Instance) -> None
"""Process plugin.
Expand Down
Loading