Skip to content

Commit

Permalink
Scheduler: Provide full meta-data for file-graph traversals
Browse files Browse the repository at this point in the history
Since we potentially have a one-to-many mapping here, we simply use
the first `item` to provide the meta-data. This is a bit hacky, but
needs full SGraph development to be fixed "properly".
  • Loading branch information
mlange05 committed Sep 19, 2023
1 parent da0af25 commit 3b7f84e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion loki/bulk/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,11 @@ def process(self, transformation):
if not items:
continue

transformation.apply(items[0].source, items=items)
_item = items[0]
transformation.apply(
items[0].source, role=_item.role, mode=_item.mode,
item=_item, items=items, targets=_item.targets,
)
else:
for item in traversal:
if item_filter and not isinstance(item, item_filter):
Expand Down

0 comments on commit 3b7f84e

Please sign in to comment.