Skip to content

Commit

Permalink
remove console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
despairblue committed Aug 1, 2024
1 parent d2eedb7 commit fe50536
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/core/src/PartialExecutionUtils/findSubgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ function findSubgraphRecursive(
newGraph: DirectedGraph,
currentBranch: Connection[],
) {
//console.log('currentBranch', currentBranch);

// If the current node is the chosen ‘trigger keep this branch.
if (current === trigger) {
console.log(`${current.name}: is trigger`);
for (const connection of currentBranch) {
newGraph.addNodes(connection.from, connection.to);
newGraph.addConnection(connection);
Expand All @@ -27,22 +24,19 @@ function findSubgraphRecursive(

// If the current node has no parents, don’t keep this branch.
if (parentConnections.length === 0) {
console.log(`${current.name}: no parents`);
return;
}

// If the current node is the destination node again, don’t keep this branch.
const isCycleWithDestinationNode =
current === destinationNode && currentBranch.some((c) => c.to === destinationNode);
if (isCycleWithDestinationNode) {
console.log(`${current.name}: isCycleWithDestinationNode`);
return;
}

// If the current node was already visited, keep this branch.
const isCycleWithCurrentNode = currentBranch.some((c) => c.to === current);
if (isCycleWithCurrentNode) {
console.log(`${current.name}: isCycleWithCurrentNode`);
// TODO: write function that adds nodes when adding connections
for (const connection of currentBranch) {
newGraph.addNodes(connection.from, connection.to);
Expand All @@ -56,7 +50,6 @@ function findSubgraphRecursive(
// Take every incoming connection and connect it to every node that is
// connected to the current node’s first output
if (current.disabled) {
console.log(`${current.name}: is disabled`);
const incomingConnections = graph.getDirectParents(current);
const outgoingConnections = graph
.getDirectChildren(current)
Expand Down

0 comments on commit fe50536

Please sign in to comment.