Merge pull request #12535 from zmstone/0219-refactor-delete-non-prod-code

refactor: delete non-prod code
This commit is contained in:
Zaiming (Stone) Shi 2024-02-19 19:04:59 +01:00 committed by GitHub
commit fd13a661cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 11 deletions

View File

@ -425,17 +425,7 @@ get_backend_module() ->
create_resource(Context, #{type := built_in_database} = Cfg) -> create_resource(Context, #{type := built_in_database} = Cfg) ->
emqx_retainer_mnesia:create_resource(Cfg), emqx_retainer_mnesia:create_resource(Cfg),
Context; Context.
create_resource(Context, #{type := DB} = Config) ->
ResourceID = erlang:iolist_to_binary([io_lib:format("~ts_~ts", [?APP, DB])]),
_ = emqx_resource:create(
ResourceID,
<<"emqx_retainer">>,
list_to_existing_atom(io_lib:format("~ts_~ts", [emqx_connector, DB])),
Config,
#{}
),
Context#{resource_id => ResourceID}.
-spec close_resource(context()) -> ok | {error, term()}. -spec close_resource(context()) -> ok | {error, term()}.
close_resource(#{resource_id := ResourceId}) -> close_resource(#{resource_id := ResourceId}) ->