Skip to content

Commit 7ebf20c

Browse files
authored
Merge pull request #2323 from oesteban/enh/logging-cached
[ENH] Logging - indicate whether the node was cached
2 parents 331e939 + 2bf1569 commit 7ebf20c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def _local_hash_check(self, jobid, graph):
339339
logger.debug('Skipping cached node %s with ID %s.',
340340
self.procs[jobid]._id, jobid)
341341
try:
342-
self._task_finished_cb(jobid)
342+
self._task_finished_cb(jobid, cached=True)
343343
self._remove_node_dirs()
344344
except Exception:
345345
logger.debug('Error skipping cached node %s (%s).',
@@ -349,13 +349,14 @@ def _local_hash_check(self, jobid, graph):
349349
return True
350350
return False
351351

352-
def _task_finished_cb(self, jobid):
352+
def _task_finished_cb(self, jobid, cached=False):
353353
""" Extract outputs and assign to inputs of dependent tasks
354354
355355
This is called when a job is completed.
356356
"""
357-
logger.info('[Job finished] jobname: %s jobid: %d' %
358-
(self.procs[jobid]._id, jobid))
357+
logger.info('[Job %d] %s (%s).', jobid,
358+
'Cached' if cached else 'Completed',
359+
self.procs[jobid].fullname)
359360
if self._status_callback:
360361
self._status_callback(self.procs[jobid], 'end')
361362
# Update job and worker queues

0 commit comments

Comments
 (0)