Added loging definitions and rich log handling. Operation and Recursive now define bypassed status based on completed count.
This commit is contained in:
+10
-11
@@ -4,6 +4,7 @@ import os
|
||||
from core.runtime.stopsignals import checkDependency
|
||||
from core.execution.processregistry import registerProcess
|
||||
from rich.progress import track
|
||||
from core.console import console
|
||||
|
||||
def buildRecursive(definition, outputs):
|
||||
process_log = True
|
||||
@@ -14,6 +15,8 @@ def buildRecursive(definition, outputs):
|
||||
source = outputs.get(definition.recursiveset["source"])
|
||||
|
||||
if source is None or source == []:
|
||||
if recursive_log:
|
||||
logging.debug(f"No items available in {source} for {definition.name}")
|
||||
return outputs, []
|
||||
|
||||
outputs = registerProcess(definition, outputs)
|
||||
@@ -25,15 +28,6 @@ def buildRecursive(definition, outputs):
|
||||
source = definition.recursiveset["source"]
|
||||
|
||||
items = outputs.get(source)
|
||||
#print(f"RECURSIVE DEBUG DURING {definition.name}")
|
||||
#print(items)
|
||||
|
||||
#if items is None:
|
||||
|
||||
# if recursive_log:
|
||||
# print(f"No items available in {source} for {definition.name}")
|
||||
#
|
||||
# return outputs, None
|
||||
|
||||
reverse = definition.recursiveset.get("reverse", False)
|
||||
|
||||
@@ -43,7 +37,8 @@ def buildRecursive(definition, outputs):
|
||||
|
||||
for item in track(
|
||||
items,
|
||||
description=f"[green]{definition.name}[/green]"
|
||||
description=f"[green]{definition.name}[/green]",
|
||||
console=console
|
||||
):
|
||||
|
||||
#for item in items:
|
||||
@@ -78,7 +73,11 @@ def buildRecursive(definition, outputs):
|
||||
outputs["processes"][definition.name]["completed"].append(job.alias)
|
||||
|
||||
if process_log:
|
||||
logging.info(f"{definition.name} completed")
|
||||
#print(outputs["processes"][definition.name]["completed"])
|
||||
if len(outputs["processes"][definition.name]["completed"]) == 1:
|
||||
logging.info(f"{definition.name} bypassed")
|
||||
else:
|
||||
logging.info(f"{definition.name} completed")
|
||||
|
||||
retain = definition.recursiveset.get("retain", True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user