Skip to content

Commit 1a3af82

Browse files
committed
bug: flux module load/unload does not work in python
Signed-off-by: vsoch <[email protected]>
1 parent d4ad2b5 commit 1a3af82

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ensemble/members/flux/minicluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def grow(self, rule, record=None):
6868
# For now use the ensemble type as the name
6969
# TODO this needs to be caught and decided upon - retry?
7070
response = self.client.action_request(
71-
name=name, namespace=namespace, action="grow", payload={}
71+
member=name, namespace=namespace, action="grow", payload={}
7272
)
7373
print(response)
7474

@@ -81,7 +81,7 @@ def shrink(self, rule, record=None):
8181
namespace = self.options["namespace"]
8282

8383
response = self.client.action_request(
84-
name=name, namespace=namespace, action="shrink", payload={}
84+
member=name, namespace=namespace, action="shrink", payload={}
8585
)
8686
print(response)
8787

ensemble/members/flux/queue.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import shlex
23
import sys
34
import time
@@ -308,10 +309,9 @@ def setup_flux_heartbeat(self):
308309
return
309310

310311
# Customize the heartbeat duration by reloading the module
311-
self.handle.rpc("module.remove", {"name": "heartbeat"}).get()
312-
self.handle.rpc(
313-
"module.load", {"path": "heartbeat", "args": [f"period={self.cfg.heartbeat}s"]}
314-
).get()
312+
# We call to system flux since python can error
313+
assert os.system("flux module remove heartbeat") == 0
314+
assert os.system(f"flux module load heartbeat period={self.cfg.heartbeat}s") == 0
315315

316316
def heartbeat_callback(handle, msg_handler, msg, arg):
317317
print("💗 HEARTBEAT")

0 commit comments

Comments
 (0)