Skip to content

Commit

Permalink
Merge pull request #739 from ghisvail/bug/workflow-fixes
Browse files Browse the repository at this point in the history
FIX: Add environment argument to TaskBase._run_task() and Workflow subclass
  • Loading branch information
effigies authored Mar 22, 2024
2 parents 8bdb994 + 14d1e19 commit e52e32b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pydra/engine/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def can_resume(self):
return self._can_resume

@abc.abstractmethod
def _run_task(self):
def _run_task(self, environment=None):
pass

@property
Expand Down Expand Up @@ -1329,7 +1329,7 @@ async def _run(self, submitter=None, rerun=False, **kwargs):
self._check_for_hash_changes()
return result

async def _run_task(self, submitter, rerun=False):
async def _run_task(self, submitter, rerun=False, environment=None):
if not submitter:
raise Exception("Submitter should already be set.")
for nd in self.graph.nodes:
Expand Down
1 change: 0 additions & 1 deletion pydra/engine/submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ async def submit_from_call(self, runnable, rerun, environment):
# 2
if runnable.state is None:
# run_el should always return a coroutine
print("in SUBM", environment)
await self.worker.run_el(runnable, rerun=rerun, environment=environment)
# 3
else:
Expand Down

0 comments on commit e52e32b

Please sign in to comment.