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

No need to publish instances if they are disabled #18

Closed
Closed
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
1 change: 0 additions & 1 deletion client/ayon_harmony/api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def receive(self):
"""
current_time = time.time()
while True:
self.log.info("wait ttt")
# Receive the data in small chunks and retransmit it
request = None
try:
Expand Down
9 changes: 9 additions & 0 deletions client/ayon_harmony/plugins/publish/collect_farm_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ def get_instances(self, context):
if product_type != "renderFarm":
continue

# check if node is enabled
enabled = harmony.send(
{"function": "node.getEnable", "args": [node]})
enabled = enabled["result"]

# Skip disabled nodes.
if not enabled:
continue

# 0 - filename / 1 - type / 2 - zeros / 3 - start / 4 - enabled
info = harmony.send(
{
Expand Down
12 changes: 9 additions & 3 deletions client/ayon_harmony/plugins/publish/collect_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ def process(self, context):
if product_type == "renderFarm":
continue

enabled = harmony.send(
{"function": "node.getEnable", "args": [node]})
enabled = enabled["result"]

# Skip disabled nodes.
if not enabled:
continue

instance = context.create_instance(node.split("/")[-1])
instance.data.update(data)
instance.data["setMembers"] = [node]
instance.data["publish"] = harmony.send(
{"function": "node.getEnable", "args": [node]}
)["result"]
instance.data["publish"] = enabled

families = [product_type]
families.extend(self.product_type_mapping[product_type])
Expand Down
Loading