mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
remove usage of 'OPENPYPE_VERSION' and 'OPENPYPE_MONGO'
This commit is contained in:
parent
9df41b1dc3
commit
895dc800d0
14 changed files with 2 additions and 114 deletions
|
|
@ -27,8 +27,8 @@ class CollectDefaultDeadlineServer(pyblish.api.ContextPlugin):
|
||||||
try:
|
try:
|
||||||
deadline_module = context.data["ayonAddonsManager"]["deadline"]
|
deadline_module = context.data["ayonAddonsManager"]["deadline"]
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.log.error("Cannot get OpenPype Deadline module.")
|
self.log.error("Cannot get AYON Deadline addon.")
|
||||||
raise AssertionError("OpenPype Deadline module not found.")
|
raise AssertionError("AYON Deadline addon not found.")
|
||||||
|
|
||||||
deadline_settings = context.data["project_settings"]["deadline"]
|
deadline_settings = context.data["project_settings"]["deadline"]
|
||||||
deadline_server_name = deadline_settings["deadline_server"]
|
deadline_server_name = deadline_settings["deadline_server"]
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ from ayon_core.pipeline import legacy_io
|
||||||
from openpype_modules.deadline import abstract_submit_deadline
|
from openpype_modules.deadline import abstract_submit_deadline
|
||||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||||
from ayon_core.tests.lib import is_in_tests
|
from ayon_core.tests.lib import is_in_tests
|
||||||
from ayon_core.lib import is_running_from_build
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s
|
@attr.s
|
||||||
|
|
@ -91,14 +90,6 @@ class AfterEffectsSubmitDeadline(
|
||||||
"IS_TEST"
|
"IS_TEST"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if self._instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
for key in keys:
|
for key in keys:
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import attr
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from ayon_core.lib import (
|
from ayon_core.lib import (
|
||||||
is_running_from_build,
|
|
||||||
BoolDef,
|
BoolDef,
|
||||||
NumberDef,
|
NumberDef,
|
||||||
TextDef,
|
TextDef,
|
||||||
|
|
@ -112,14 +111,6 @@ class BlenderSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline,
|
||||||
"IS_TEST"
|
"IS_TEST"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if self._instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ from ayon_core.pipeline.publish import (
|
||||||
from ayon_core.lib import (
|
from ayon_core.lib import (
|
||||||
BoolDef,
|
BoolDef,
|
||||||
NumberDef,
|
NumberDef,
|
||||||
is_running_from_build
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -232,10 +231,6 @@ class FusionSubmitDeadline(
|
||||||
"AYON_BUNDLE_NAME",
|
"AYON_BUNDLE_NAME",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ from ayon_core.pipeline import legacy_io
|
||||||
from openpype_modules.deadline import abstract_submit_deadline
|
from openpype_modules.deadline import abstract_submit_deadline
|
||||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||||
from ayon_core.tests.lib import is_in_tests
|
from ayon_core.tests.lib import is_in_tests
|
||||||
from ayon_core.lib import is_running_from_build
|
|
||||||
|
|
||||||
|
|
||||||
class _ZipFile(ZipFile):
|
class _ZipFile(ZipFile):
|
||||||
|
|
@ -284,14 +283,6 @@ class HarmonySubmitDeadline(
|
||||||
"IS_TEST"
|
"IS_TEST"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if self._instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
for key in keys:
|
for key in keys:
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ from ayon_core.pipeline import (
|
||||||
AYONPyblishPluginMixin
|
AYONPyblishPluginMixin
|
||||||
)
|
)
|
||||||
from ayon_core.tests.lib import is_in_tests
|
from ayon_core.tests.lib import is_in_tests
|
||||||
from ayon_core.lib import is_running_from_build
|
|
||||||
from openpype_modules.deadline import abstract_submit_deadline
|
from openpype_modules.deadline import abstract_submit_deadline
|
||||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||||
|
|
||||||
|
|
@ -38,10 +37,6 @@ class HoudiniCacheSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
|
||||||
Publishing in Deadline can be helpful for scenes that publish very slow.
|
Publishing in Deadline can be helpful for scenes that publish very slow.
|
||||||
This way it can process in the background on another machine without the
|
This way it can process in the background on another machine without the
|
||||||
Artist having to wait for the publish to finish on their local machine.
|
Artist having to wait for the publish to finish on their local machine.
|
||||||
|
|
||||||
Submission is done through the Deadline Web Service as
|
|
||||||
supplied via the environment variable AVALON_DEADLINE.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
label = "Submit Scene to Deadline"
|
label = "Submit Scene to Deadline"
|
||||||
|
|
@ -65,12 +60,6 @@ class HoudiniCacheSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
|
||||||
result["success"] for result in context.data["results"]
|
result["success"] for result in context.data["results"]
|
||||||
), "Errors found, aborting integration.."
|
), "Errors found, aborting integration.."
|
||||||
|
|
||||||
# Deadline connection
|
|
||||||
AVALON_DEADLINE = legacy_io.Session.get(
|
|
||||||
"AVALON_DEADLINE", "http://localhost:8082"
|
|
||||||
)
|
|
||||||
assert AVALON_DEADLINE, "Requires AVALON_DEADLINE"
|
|
||||||
|
|
||||||
project_name = instance.context.data["projectName"]
|
project_name = instance.context.data["projectName"]
|
||||||
filepath = context.data["currentFile"]
|
filepath = context.data["currentFile"]
|
||||||
scenename = os.path.basename(filepath)
|
scenename = os.path.basename(filepath)
|
||||||
|
|
@ -118,13 +107,6 @@ class HoudiniCacheSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline
|
||||||
"OPENPYPE_LOG_NO_COLORS",
|
"OPENPYPE_LOG_NO_COLORS",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if self._instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import pyblish.api
|
||||||
|
|
||||||
from ayon_core.pipeline import legacy_io
|
from ayon_core.pipeline import legacy_io
|
||||||
from ayon_core.tests.lib import is_in_tests
|
from ayon_core.tests.lib import is_in_tests
|
||||||
from ayon_core.lib import is_running_from_build
|
|
||||||
|
|
||||||
|
|
||||||
class HoudiniSubmitPublishDeadline(pyblish.api.ContextPlugin):
|
class HoudiniSubmitPublishDeadline(pyblish.api.ContextPlugin):
|
||||||
|
|
@ -138,14 +137,6 @@ class HoudiniSubmitPublishDeadline(pyblish.api.ContextPlugin):
|
||||||
"AVALON_TOOLS"
|
"AVALON_TOOLS"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict(
|
environment = dict(
|
||||||
{key: os.environ[key] for key in keys if key in os.environ},
|
{key: os.environ[key] for key in keys if key in os.environ},
|
||||||
**legacy_io.Session
|
**legacy_io.Session
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ from ayon_core.tests.lib import is_in_tests
|
||||||
from openpype_modules.deadline import abstract_submit_deadline
|
from openpype_modules.deadline import abstract_submit_deadline
|
||||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||||
from ayon_core.lib import (
|
from ayon_core.lib import (
|
||||||
is_running_from_build,
|
|
||||||
BoolDef,
|
BoolDef,
|
||||||
NumberDef
|
NumberDef
|
||||||
)
|
)
|
||||||
|
|
@ -213,14 +212,6 @@ class HoudiniSubmitDeadline(
|
||||||
"OPENPYPE_LOG_NO_COLORS",
|
"OPENPYPE_LOG_NO_COLORS",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if self._instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ from ayon_core.hosts.max.api.lib import (
|
||||||
from ayon_core.hosts.max.api.lib_rendersettings import RenderSettings
|
from ayon_core.hosts.max.api.lib_rendersettings import RenderSettings
|
||||||
from openpype_modules.deadline import abstract_submit_deadline
|
from openpype_modules.deadline import abstract_submit_deadline
|
||||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||||
from ayon_core.lib import is_running_from_build
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s
|
@attr.s
|
||||||
|
|
@ -116,14 +115,6 @@ class MaxSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline,
|
||||||
"IS_TEST"
|
"IS_TEST"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if self._instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ from ayon_core.hosts.maya.api.lib import get_attr_in_layer
|
||||||
from openpype_modules.deadline import abstract_submit_deadline
|
from openpype_modules.deadline import abstract_submit_deadline
|
||||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||||
from ayon_core.tests.lib import is_in_tests
|
from ayon_core.tests.lib import is_in_tests
|
||||||
from ayon_core.lib import is_running_from_build
|
|
||||||
from ayon_core.pipeline.farm.tools import iter_expected_files
|
from ayon_core.pipeline.farm.tools import iter_expected_files
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -209,14 +208,6 @@ class MayaSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline,
|
||||||
"IS_TEST"
|
"IS_TEST"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if self._instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ from datetime import datetime
|
||||||
|
|
||||||
from ayon_core.pipeline import legacy_io, PublishXmlValidationError
|
from ayon_core.pipeline import legacy_io, PublishXmlValidationError
|
||||||
from ayon_core.tests.lib import is_in_tests
|
from ayon_core.tests.lib import is_in_tests
|
||||||
from ayon_core.lib import is_running_from_build
|
|
||||||
from openpype_modules.deadline import abstract_submit_deadline
|
from openpype_modules.deadline import abstract_submit_deadline
|
||||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||||
|
|
||||||
|
|
@ -99,10 +98,6 @@ class MayaSubmitRemotePublishDeadline(
|
||||||
"FTRACK_SERVER"
|
"FTRACK_SERVER"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
environment = dict({key: os.environ[key] for key in keys
|
environment = dict({key: os.environ[key] for key in keys
|
||||||
if key in os.environ}, **legacy_io.Session)
|
if key in os.environ}, **legacy_io.Session)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ from ayon_core.pipeline.publish import (
|
||||||
)
|
)
|
||||||
from ayon_core.tests.lib import is_in_tests
|
from ayon_core.tests.lib import is_in_tests
|
||||||
from ayon_core.lib import (
|
from ayon_core.lib import (
|
||||||
is_running_from_build,
|
|
||||||
BoolDef,
|
BoolDef,
|
||||||
NumberDef
|
NumberDef
|
||||||
)
|
)
|
||||||
|
|
@ -390,14 +389,6 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin,
|
||||||
"AYON_BUNDLE_NAME",
|
"AYON_BUNDLE_NAME",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add OpenPype version if we are running from build.
|
|
||||||
if is_running_from_build():
|
|
||||||
keys.append("OPENPYPE_VERSION")
|
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
keys.append("OPENPYPE_MONGO")
|
|
||||||
|
|
||||||
# add allowed keys from preset if any
|
# add allowed keys from preset if any
|
||||||
if self.env_allowed_keys:
|
if self.env_allowed_keys:
|
||||||
keys += self.env_allowed_keys
|
keys += self.env_allowed_keys
|
||||||
|
|
|
||||||
|
|
@ -153,12 +153,6 @@ class ProcessSubmittedCacheJobOnFarm(pyblish.api.InstancePlugin,
|
||||||
if job_environ.get(env_j_key):
|
if job_environ.get(env_j_key):
|
||||||
environment[env_j_key] = job_environ[env_j_key]
|
environment[env_j_key] = job_environ[env_j_key]
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
mongo_url = os.environ.get("OPENPYPE_MONGO")
|
|
||||||
if mongo_url:
|
|
||||||
environment["OPENPYPE_MONGO"] = mongo_url
|
|
||||||
|
|
||||||
priority = self.deadline_priority or instance.data.get("priority", 50)
|
priority = self.deadline_priority or instance.data.get("priority", 50)
|
||||||
|
|
||||||
instance_settings = self.get_attr_values_from_data(instance.data)
|
instance_settings = self.get_attr_values_from_data(instance.data)
|
||||||
|
|
|
||||||
|
|
@ -209,12 +209,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin,
|
||||||
if job_environ.get(env_j_key):
|
if job_environ.get(env_j_key):
|
||||||
environment[env_j_key] = job_environ[env_j_key]
|
environment[env_j_key] = job_environ[env_j_key]
|
||||||
|
|
||||||
# Add mongo url if it's enabled
|
|
||||||
if instance.context.data.get("deadlinePassMongoUrl"):
|
|
||||||
mongo_url = os.environ.get("OPENPYPE_MONGO")
|
|
||||||
if mongo_url:
|
|
||||||
environment["OPENPYPE_MONGO"] = mongo_url
|
|
||||||
|
|
||||||
priority = self.deadline_priority or instance.data.get("priority", 50)
|
priority = self.deadline_priority or instance.data.get("priority", 50)
|
||||||
|
|
||||||
instance_settings = self.get_attr_values_from_data(instance.data)
|
instance_settings = self.get_attr_values_from_data(instance.data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue