Skip to content

Commit c9f786e

Browse files
authored
SSHManager: Add the custom_worker_flag option, but don't add it to the public API
1 parent ff8689a commit c9f786e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/managers.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ default_addprocs_params(::SSHManager) =
168168
:sshflags => ``,
169169
:shell => :posix,
170170
:cmdline_cookie => false,
171+
:custom_worker_flag => nothing,
171172
:env => [],
172173
:tunnel => false,
173174
:multiplex => false,
@@ -238,6 +239,7 @@ function launch_on_machine(manager::SSHManager, machine::AbstractString, cnt, pa
238239
tunnel = params[:tunnel]
239240
multiplex = params[:multiplex]
240241
cmdline_cookie = params[:cmdline_cookie]
242+
custom_worker_flag = params[:custom_worker_flag]
241243
env = Dict{String,String}(params[:env])
242244

243245
# machine could be of the format [user@]host[:port] bind_addr[:bind_port]
@@ -249,10 +251,14 @@ function launch_on_machine(manager::SSHManager, machine::AbstractString, cnt, pa
249251
if length(machine_bind) > 1
250252
exeflags = `--bind-to $(machine_bind[2]) $exeflags`
251253
end
252-
if cmdline_cookie
253-
exeflags = `$exeflags --worker=$(cluster_cookie())`
254+
if isnothing(custom_worker_flag)
255+
if cmdline_cookie
256+
exeflags = `$exeflags --worker=$(cluster_cookie())`
257+
else
258+
exeflags = `$exeflags --worker`
259+
end
254260
else
255-
exeflags = `$exeflags --worker`
261+
exeflags = `$exeflags $custom_worker_flag`
256262
end
257263

258264
host, portnum = parse_machine(machine_bind[1])

0 commit comments

Comments
 (0)