Explorar el Código

refactor: delete non-prod code

So far the retainer backend type is always `built_in_database`.
The slightly over-engineered pre-implementation to support
another backend is likely not going to fly as the EMQX
resource frame work is mostly for auth and data integration.
i.e. not generic enough for retained messages.
Zaiming (Stone) Shi hace 2 años
padre
commit
ad53523e6b
Se han modificado 1 ficheros con 1 adiciones y 11 borrados
  1. 1 11
      apps/emqx_retainer/src/emqx_retainer.erl

+ 1 - 11
apps/emqx_retainer/src/emqx_retainer.erl

@@ -425,17 +425,7 @@ get_backend_module() ->
 
 create_resource(Context, #{type := built_in_database} = Cfg) ->
     emqx_retainer_mnesia:create_resource(Cfg),
-    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}.
+    Context.
 
 -spec close_resource(context()) -> ok | {error, term()}.
 close_resource(#{resource_id := ResourceId}) ->