mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
OP-3426 - added date string to batch name
It would be better to have separate batches for automatic tests than single batch with a lot of runs.
This commit is contained in:
parent
b996acaf9c
commit
e9dfcf64bb
7 changed files with 30 additions and 6 deletions
|
|
@ -2,6 +2,7 @@ import os
|
|||
import attr
|
||||
import getpass
|
||||
import pyblish.api
|
||||
from datetime import datetime
|
||||
|
||||
from openpype.lib import (
|
||||
env_value_to_bool,
|
||||
|
|
@ -48,9 +49,11 @@ class AfterEffectsSubmitDeadline(
|
|||
|
||||
context = self._instance.context
|
||||
|
||||
batch_name = os.path.basename(self._instance.data["source"])
|
||||
if os.environ.get("IS_TEST"):
|
||||
batch_name += datetime.now().strftime("%d%m%Y%H%M%S")
|
||||
dln_job_info.Name = self._instance.data["name"]
|
||||
dln_job_info.BatchName = os.path.basename(self._instance.
|
||||
data["source"])
|
||||
dln_job_info.BatchName = batch_name
|
||||
dln_job_info.Plugin = "AfterEffects"
|
||||
dln_job_info.UserName = context.data.get(
|
||||
"deadlineUser", getpass.getuser())
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ from pathlib import Path
|
|||
from collections import OrderedDict
|
||||
from zipfile import ZipFile, is_zipfile
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
import attr
|
||||
import pyblish.api
|
||||
|
|
@ -261,7 +262,10 @@ class HarmonySubmitDeadline(
|
|||
job_info.Pool = self._instance.data.get("primaryPool")
|
||||
job_info.SecondaryPool = self._instance.data.get("secondaryPool")
|
||||
job_info.ChunkSize = self.chunk_size
|
||||
job_info.BatchName = os.path.basename(self._instance.data["source"])
|
||||
batch_name = os.path.basename(self._instance.data["source"])
|
||||
if os.environ.get("IS_TEST"):
|
||||
batch_name += datetime.now().strftime("%d%m%Y%H%M%S")
|
||||
job_info.BatchName = batch_name
|
||||
job_info.Department = self.department
|
||||
job_info.Group = self.group
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
import hou
|
||||
|
|
@ -60,6 +61,8 @@ class HoudiniSubmitPublishDeadline(pyblish.api.ContextPlugin):
|
|||
|
||||
job_name = "{scene} [PUBLISH]".format(scene=scenename)
|
||||
batch_name = "{code} - {scene}".format(code=code, scene=scenename)
|
||||
if os.environ.get("IS_TEST"):
|
||||
batch_name += datetime.now().strftime("%d%m%Y%H%M%S")
|
||||
deadline_user = "roy" # todo: get deadline user dynamically
|
||||
|
||||
# Get only major.minor version of Houdini, ignore patch version
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import json
|
||||
import getpass
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
import pyblish.api
|
||||
|
|
@ -45,6 +46,9 @@ class HoudiniSubmitRenderDeadline(pyblish.api.InstancePlugin):
|
|||
if code:
|
||||
batch_name = "{0} - {1}".format(code, batch_name)
|
||||
|
||||
if os.environ.get("IS_TEST"):
|
||||
batch_name += datetime.now().strftime("%d%m%Y%H%M%S")
|
||||
|
||||
# Output driver to render
|
||||
driver = instance[0]
|
||||
|
||||
|
|
|
|||
|
|
@ -118,6 +118,9 @@ class MayaSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline):
|
|||
src_filepath = context.data["currentFile"]
|
||||
src_filename = os.path.basename(src_filepath)
|
||||
|
||||
if os.environ.get("IS_TEST"):
|
||||
src_filename += datetime.now().strftime("%d%m%Y%H%M%S")
|
||||
|
||||
job_info.Name = "%s - %s" % (src_filename, instance.name)
|
||||
job_info.BatchName = src_filename
|
||||
job_info.Plugin = instance.data.get("mayaRenderPlugin", "MayaBatch")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import requests
|
||||
from datetime import datetime
|
||||
|
||||
from maya import cmds
|
||||
|
||||
|
|
@ -57,6 +58,8 @@ class MayaSubmitRemotePublishDeadline(pyblish.api.InstancePlugin):
|
|||
job_name = "{scene} [PUBLISH]".format(scene=scenename)
|
||||
batch_name = "{code} - {scene}".format(code=project_name,
|
||||
scene=scenename)
|
||||
if os.environ.get("IS_TEST"):
|
||||
batch_name += datetime.now().strftime("%d%m%Y%H%M%S")
|
||||
|
||||
# Generate the payload for Deadline submission
|
||||
payload = {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import os
|
|||
import re
|
||||
import json
|
||||
import getpass
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
import pyblish.api
|
||||
|
|
@ -141,8 +142,11 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
responce_data=None
|
||||
):
|
||||
render_dir = os.path.normpath(os.path.dirname(render_path))
|
||||
script_name = os.path.basename(script_path)
|
||||
jobname = "%s - %s" % (script_name, instance.name)
|
||||
batch_name = os.path.basename(script_path)
|
||||
jobname = "%s - %s" % (batch_name, instance.name)
|
||||
if os.environ.get("IS_TEST"):
|
||||
batch_name += datetime.now().strftime("%d%m%Y%H%M%S")
|
||||
|
||||
|
||||
output_filename_0 = self.preview_fname(render_path)
|
||||
|
||||
|
|
@ -176,7 +180,7 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
payload = {
|
||||
"JobInfo": {
|
||||
# Top-level group name
|
||||
"BatchName": script_name,
|
||||
"BatchName": batch_name,
|
||||
|
||||
# Asset dependency to wait for at least the scene file to sync.
|
||||
# "AssetDependency0": script_path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue