Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure cancel arrives at executor #3274

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/radical/pilot/agent/executing/popen.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def initialize(self):
#
def cancel_task(self, uid):

self._log.debug('request cancel task %s', uid)
self._watch_queue.put([self.TO_CANCEL, uid])


Expand Down Expand Up @@ -289,7 +290,6 @@ def _watch(self):
# next step. Also check for a requested cancellation for the tasks.
def _check_running(self, to_watch, to_cancel):

#
action = False

# `to_watch.remove()` in the loop requires copy to iterate over the list
Expand Down
5 changes: 3 additions & 2 deletions src/radical/pilot/utils/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ def _control_cb(self, topic, msg):
with self._cancel_lock:
self._cancel_list += uids

# scheduler handles cancelation itself
if 'AgentSchedulingComponent' in repr(self):
# scheduler and executor handle cancelation directly
if 'agent.scheduler' in repr(self) or \
'agent.executing' in repr(self):
self.control_cb(topic, msg)
return

Expand Down