Skip to content

Commit 8c0e9bd

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)