Skip to content

Commit

Permalink
executorlib renamed interface to spawner
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Oct 1, 2024
1 parent 38ec89b commit e39c512
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions conda_subprocess/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from executorlib.shared.communication import SocketInterface
from executorlib.shared.executor import get_command_path
from executorlib.shared.interface import SubprocessInterface
from executorlib.shared.spawner import SubprocessSpawner

from conda_subprocess.process import Popen

Expand All @@ -24,17 +24,17 @@ def function_wrapped(*args, **kwargs):
"kwargs": kwargs,
"resource_dict": {"cores": 1},
}
interface = SocketInterface(interface=SubprocessInterface(cores=1))
interface = SocketInterface(spawner=SubprocessSpawner(cores=1))
command_lst = [
"python",
get_command_path(executable="interactive_serial.py"),
]
if not hostname_localhost:
command_lst += ["--host", gethostname()]
command_lst += ["--zmqport", str(interface.bind_to_random_port())]
interface._interface._process = Popen(
args=interface._interface.generate_command(command_lst=command_lst),
cwd=interface._interface._cwd,
interface._spawner._process = Popen(
args=interface._spawner.generate_command(command_lst=command_lst),
cwd=interface._spawner._cwd,
stdin=subprocess.DEVNULL,
prefix_name=prefix_name,
prefix_path=prefix_path,
Expand Down

0 comments on commit e39c512

Please sign in to comment.