@@ -1342,23 +1342,6 @@ def _helper(sql_edges, edges, nodes):
1342
1342
# If the job is in success we don't need to do anything
1343
1343
# else since it would've been added by the code above
1344
1344
if jstatus != 'success' :
1345
- # Connect the job with his input artifacts, the
1346
- # input artifacts may or may not exist yet, so we
1347
- # need to check both the input_artifacts and the
1348
- # pending properties
1349
- for in_art in n_obj .input_artifacts :
1350
- iid = in_art .id
1351
- if iid not in nodes and iid in extra_nodes :
1352
- nodes [iid ] = extra_nodes [iid ]
1353
- _add_edge (edges , nodes [iid ], nodes [n_obj .id ])
1354
-
1355
- pending = n_obj .pending
1356
- for pred_id in pending :
1357
- for pname in pending [pred_id ]:
1358
- in_node_id = '%s:%s' % (
1359
- pred_id , pending [pred_id ][pname ])
1360
- _add_edge (edges , nodes [in_node_id ],
1361
- nodes [n_obj .id ])
1362
1345
1363
1346
if jstatus != 'error' :
1364
1347
# If the job is not errored, we can add the
@@ -1380,6 +1363,34 @@ def _helper(sql_edges, edges, nodes):
1380
1363
queue .append (cjob .id )
1381
1364
if cjob .id not in nodes :
1382
1365
nodes [cjob .id ] = ('job' , cjob )
1366
+
1367
+ # including the outputs
1368
+ for o_name , o_type in cjob .command .outputs :
1369
+ node_id = '%s:%s' % (cjob .id , o_name )
1370
+ node = TypeNode (
1371
+ id = node_id , job_id = cjob .id ,
1372
+ name = o_name , type = o_type )
1373
+ if node_id not in nodes :
1374
+ nodes [node_id ] = ('type' , node )
1375
+
1376
+ # Connect the job with his input artifacts, the
1377
+ # input artifacts may or may not exist yet, so we
1378
+ # need to check both the input_artifacts and the
1379
+ # pending properties
1380
+ for in_art in n_obj .input_artifacts :
1381
+ iid = in_art .id
1382
+ if iid not in nodes and iid in extra_nodes :
1383
+ nodes [iid ] = extra_nodes [iid ]
1384
+ _add_edge (edges , nodes [iid ], nodes [n_obj .id ])
1385
+
1386
+ pending = n_obj .pending
1387
+ for pred_id in pending :
1388
+ for pname in pending [pred_id ]:
1389
+ in_node_id = '%s:%s' % (
1390
+ pred_id , pending [pred_id ][pname ])
1391
+ _add_edge (edges , nodes [in_node_id ],
1392
+ nodes [n_obj .id ])
1393
+
1383
1394
elif n_type == 'type' :
1384
1395
# Connect this 'future artifact' with the job that will
1385
1396
# generate it
0 commit comments