remove executable_group from config
This commit is contained in:
parent
680631ed34
commit
c1bb026cb4
@ -3,9 +3,9 @@
|
|||||||
, pool => #{id => <<"ct_26xqeE3YKmZV8jrks57JSgZRCHSuG4RGzpnvdz6AAiSSTVbJRM">>,
|
, pool => #{id => <<"ct_26xqeE3YKmZV8jrks57JSgZRCHSuG4RGzpnvdz6AAiSSTVbJRM">>,
|
||||||
host => <<"127.0.0.1">>}
|
host => <<"127.0.0.1">>}
|
||||||
, workers =>
|
, workers =>
|
||||||
[#{executable => <<"mean15-generic">>, <<"executable_group">> => <<"cpu">>}
|
[#{executable => <<"mean15-generic">>}
|
||||||
,#{executable => <<"mean15-generic">>, <<"executable_group">> => <<"cpu">>}
|
,#{executable => <<"mean15-generic">>}
|
||||||
,#{executable => <<"mean15-generic">>, <<"executable_group">> => <<"cpu">>}
|
,#{executable => <<"mean15-generic">>}
|
||||||
,#{executable => <<"mean15-generic">>, <<"executable_group">> => <<"cpu">>}
|
,#{executable => <<"mean15-generic">>}
|
||||||
]
|
]
|
||||||
}.
|
}.
|
||||||
|
@ -65,8 +65,7 @@ pool_admin() ->
|
|||||||
|
|
||||||
workers() ->
|
workers() ->
|
||||||
array(
|
array(
|
||||||
#{default => [#{executable => <<"mean29-generic">>,
|
#{default => [#{executable => <<"mean29-generic">>}],
|
||||||
executable_group => <<"cpu">>}],
|
|
||||||
description =>
|
description =>
|
||||||
<<"Definitions of workers' configurations. If no worker are configured one worker "
|
<<"Definitions of workers' configurations. If no worker are configured one worker "
|
||||||
"is used as default, i.e. 'mean29-generic' executable without any extra args.">>},
|
"is used as default, i.e. 'mean29-generic' executable without any extra args.">>},
|
||||||
@ -81,10 +80,6 @@ workers() ->
|
|||||||
"\"lean29-generic\" (CPU-intensive, useful if memory-constrained), "
|
"\"lean29-generic\" (CPU-intensive, useful if memory-constrained), "
|
||||||
"\"lean29-avx2\" (CPU-intensive, useful if memory-constrained, benefits "
|
"\"lean29-avx2\" (CPU-intensive, useful if memory-constrained, benefits "
|
||||||
"from faster CPU supporting AVX2 instructions).">>}),
|
"from faster CPU supporting AVX2 instructions).">>}),
|
||||||
executable_group =>
|
|
||||||
str(#{description => <<"Group of executable binaries of the worker.">>,
|
|
||||||
enum => [ <<"cpu">>, <<"cuda">> ],
|
|
||||||
default => <<"cpu">>}),
|
|
||||||
extra_args =>
|
extra_args =>
|
||||||
str(#{description => <<"Extra arguments to pass to the worker executable binary. "
|
str(#{description => <<"Extra arguments to pass to the worker executable binary. "
|
||||||
"The safest choice is specifying no arguments i.e. empty string.">>,
|
"The safest choice is specifying no arguments i.e. empty string.">>,
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
-include_lib("kernel/include/logger.hrl").
|
-include_lib("kernel/include/logger.hrl").
|
||||||
|
|
||||||
-define(DEFAULT_EXECUTABLE_GROUP , <<"cpu">>).
|
-define(DEFAULT_EXECUTABLE_GROUP , <<"gmhive">>).
|
||||||
-define(DEFAULT_EXTRA_ARGS , <<>>).
|
-define(DEFAULT_EXTRA_ARGS , <<>>).
|
||||||
-define(DEFAULT_HEX_ENCODED_HEADER , false).
|
-define(DEFAULT_HEX_ENCODED_HEADER , false).
|
||||||
-define(DEFAULT_REPEATS , 1).
|
-define(DEFAULT_REPEATS , 1).
|
||||||
@ -55,7 +55,7 @@ generate_from_hash(Hash, Target, Nonce, Config, WorkerInstance) ->
|
|||||||
|
|
||||||
build_worker_config(Config) when is_map(Config) ->
|
build_worker_config(Config) when is_map(Config) ->
|
||||||
Exec = maps:get(<<"executable">>, Config),
|
Exec = maps:get(<<"executable">>, Config),
|
||||||
ExecGroup = maps:get(<<"executable_group">>, Config, ?DEFAULT_EXECUTABLE_GROUP),
|
ExecGroup = ?DEFAULT_EXECUTABLE_GROUP,
|
||||||
ExtraArgs = maps:get(<<"extra_args">>, Config, ?DEFAULT_EXTRA_ARGS),
|
ExtraArgs = maps:get(<<"extra_args">>, Config, ?DEFAULT_EXTRA_ARGS),
|
||||||
HexEncHdr = maps:get(<<"hex_encoded_header">>, Config,
|
HexEncHdr = maps:get(<<"hex_encoded_header">>, Config,
|
||||||
hex_encoding_default(ExecGroup, Exec)),
|
hex_encoding_default(ExecGroup, Exec)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user