in gen_backfill_report.py [0:0]
def get_owner_information(owners, taskids):
"""
Uses the given task IDs to determine the owner or
person who created them.
"""
filter_by_owners = {}
AD_BK_OWNER_QUERY["where"]["and"].append(
{"in": {"task.id": taskids}},
)
owner_data = query_activedata(AD_BK_OWNER_QUERY)
for c, taskid in enumerate(owner_data["task.id"]):
possible_owners = [o for o in owner_data["task.tags.value"][c] if o]
if not possible_owners:
# Missing owner information
continue
# There should only every be one owner. If
# either of the requested owners match it,
# then we keep this task and download
# artifacts from it.
task_owner = possible_owners[0]
for owner in owners:
if owner in task_owner:
filter_by_owners[taskid] = True
break
return filter_by_owners