Skip to content

Commit

Permalink
keep pilot RPCs local
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-merzky committed Sep 22, 2023
1 parent d1ef2b1 commit 48d2df4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/radical/pilot/agent/agent_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def initialize(self):
'export PATH=%s'
% os.environ.get('PATH', '')]
}
self.rpc('prepare_env', env_name='rp', env_spec=env_spec)
self.rpc('prepare_env', env_name='rp', env_spec=env_spec,
addr=self._pid)

# start any services if they are requested
self._start_services()
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 @@ -467,7 +467,7 @@ def register_rpc_handler(self, cmd, handler, addr=None):

# --------------------------------------------------------------------------
#
def rpc(self, cmd, *args, **kwargs):
def rpc(self, cmd, addr=None, *args, **kwargs):
'''Remote procedure call.
Send am RPC command and arguments to the control pubsub and wait for the
Expand All @@ -479,7 +479,8 @@ def rpc(self, cmd, *args, **kwargs):

rpc_id = ru.generate_id('%s.rpc' % self._uid)
rpc_req = RPCRequestMessage(uid=rpc_id, cmd=cmd,
args=args, kwargs=kwargs)
args=args, kwargs=kwargs,
addr=addr)

self._rpc_reqs[rpc_id] = {
'req': rpc_req,
Expand Down

0 comments on commit 48d2df4

Please sign in to comment.