Skip to content

Commit

Permalink
Merge pull request #10926 from zmstone/0602-add-enable-as-an-alias-fo…
Browse files Browse the repository at this point in the history
…r-enabled

0602 add enable as an alias for enabled
  • Loading branch information
zmstone committed Jun 9, 2023
2 parents 9f6beee + abdbf34 commit ee69783
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions apps/emqx/src/emqx_schema.erl
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ fields("persistent_session_store") ->
boolean(),
#{
default => false,
%% TODO(5.2): change field name to 'enable' and keep 'enabled' as an alias
aliases => [enable],
desc => ?DESC(persistent_session_store_enabled)
}
)},
Expand Down Expand Up @@ -2003,6 +2005,8 @@ base_listener(Bind) ->
boolean(),
#{
default => true,
%% TODO(5.2): change field name to 'enable' and keep 'enabled' as an alias
aliases => [enable],
desc => ?DESC(fields_listener_enabled)
}
)},
Expand Down
8 changes: 6 additions & 2 deletions apps/emqx_conf/src/emqx_conf_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,13 @@ sync_data_from_node(Node) ->
{ok, DataBin} ->
case zip:unzip(DataBin, [{cwd, emqx:data_dir()}]) of
{ok, []} ->
?SLOG(debug, #{node => Node, msg => "sync_data_from_node_ignore"});
?SLOG(debug, #{node => Node, msg => "sync_data_from_node_empty_response"});
{ok, Files} ->
?SLOG(debug, #{node => Node, msg => "sync_data_from_node_ok", files => Files})
?SLOG(debug, #{
node => Node,
msg => "sync_data_from_node_non_empty_response",
files => Files
})
end,
ok;
Error ->
Expand Down
5 changes: 5 additions & 0 deletions changes/ce/feat-10926.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Allow 'enable' as well as 'enabled' as the state flag for listeners.

Prior to this change, listener can be enable/disabled by setting the 'true' or 'false' on the 'enabled' config.
This is slightly different naming comparing to other state flags in the system.
No the 'enable' flag is added as an aliase on listeners.

0 comments on commit ee69783

Please sign in to comment.