added logs to collector

This commit is contained in:
iLLiCiTiT 2021-10-14 12:50:59 +02:00
parent b966ba135a
commit 0484782010

View file

@ -6,6 +6,7 @@ Requires:
Provides:
Instance
"""
import json
import pyblish.api
from openpype.hosts.tvpaint.worker import (
TVPaintCommands,
@ -33,7 +34,14 @@ class CollectTVPaintWorkfileData(pyblish.api.InstancePlugin):
# Send job data to job queue server
job_data = commands.to_job_data()
self.debug("Sending job to JobQueue server.\n{}".format(
json.dumps(job_data, indent=4)
))
job_id = job_queue_module.send_job("tvpaint", job_data)
self.log.info((
"Job sent to JobQueue server and got id \"{}\"."
" Waiting for finishing the job."
).format(job_id))
# Wait for job to be finished
while True:
job_status = job_queue_module.get_job_status(job_id)
@ -50,4 +58,7 @@ class CollectTVPaintWorkfileData(pyblish.api.InstancePlugin):
message
)
)
instance.data["sceneData"] = job_status["result"]
job_result = job_status["result"]
self.log.debug("Job is done with result.\n{}".format(job_result))
instance.data["sceneData"] = job_result