Skip to content

Commit

Permalink
fixes (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoranAngevaare authored Jul 13, 2022
1 parent eec7af6 commit 6c0a571
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/bootstrax
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,16 @@ def check_data_written(rd):
on this host
"""
files_written = 0
for ddoc in rd['data']:

# Fetch the rd again -> to see status of 'data' field
new_rd = get_run(mongo_id=rd['_id'], full_doc=True)
log.debug(new_rd['data'])
for ddoc in new_rd['data']:
ddoc_loc = ddoc.get('location', 'NO LOCATION')
ddoc_host = ddoc.get('host', 'NO HOST')
log.debug(f'Checking {ddoc_loc} on {ddoc_host}')
log.debug(f'Checking {ddoc_loc} on {ddoc_host} (current {hostname})')
if ddoc_host == hostname:
log.debug(f'Counting files {ddoc_loc} on {ddoc_host}')
if os.path.exists(ddoc_loc):
log.debug(f'{ddoc_loc} written')
files_written += 1
Expand Down

0 comments on commit 6c0a571

Please sign in to comment.