Skip to content

Commit

Permalink
CalcJobOutputFollower: Fetch retrieved output file if available (aiid…
Browse files Browse the repository at this point in the history
…alab#269)

Besides performance reasons, this work better
when the remote folder is cleared.
  • Loading branch information
danielhollas authored Sep 20, 2022
1 parent d49023d commit 6d24a37
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion aiidalab_qe/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,15 @@ def _follow_output(self, calcjob):

def _fetch_output(self, calcjob):
assert isinstance(calcjob, CalcJobNode)
if "remote_folder" in calcjob.outputs:
if "retrieved" in calcjob.outputs:
try:
self.filename = calcjob.attributes["output_filename"]
with calcjob.outputs.retrieved.open(self.filename) as f:
return f.read().splitlines()
except OSError:
return list()

elif "remote_folder" in calcjob.outputs:
try:
fn_out = calcjob.attributes["output_filename"]
self.filename = fn_out
Expand Down

0 comments on commit 6d24a37

Please sign in to comment.