Merge pull request #11787 from zmstone/1018-refactor-improve-nodetool-performance

refactor(nodetool): only add libs when necessary
This commit is contained in:
Zaiming (Stone) Shi 2023-10-18 16:37:51 +02:00 committed by GitHub
commit f985f149d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -21,12 +21,13 @@ main(Args) ->
ok
end
end,
ok = add_libs_dir(),
case Args of
["hocon" | Rest] ->
ok = add_libs_dir(),
%% forward the call to hocon_cli
hocon_cli:main(Rest);
["check_license_key", Key0] ->
ok = add_libs_dir(),
Key = cleanup_key(Key0),
check_license(#{key => Key});
_ ->

View File

@ -0,0 +1,3 @@
Improve `emqx` command performance.
Avoid loading EMQX application code in `nodetool` script unless necessary.