fix(rule-engine): fix update resource maybe remove resource

This commit is contained in:
wwhai 2021-01-25 10:47:09 +08:00 committed by Shawn
parent 3322bb60c3
commit f3420e8810
2 changed files with 3 additions and 4 deletions

View File

@ -297,8 +297,7 @@ do_update_resource(#{id := Id, type := Type, description:= NewDescription, confi
type = Type, type = Type,
config = Config, config = Config,
description = NewDescription, description = NewDescription,
created_at = erlang:system_time(millisecond)}), created_at = erlang:system_time(millisecond)})
cluster_call(clear_resource, [Module, Destroy, Id])
end. end.
-spec(start_resource(resource_id()) -> ok | {error, Reason :: term()}). -spec(start_resource(resource_id()) -> ok | {error, Reason :: term()}).

View File

@ -355,9 +355,9 @@ pool_opts(Params = #{<<"url">> := URL}) ->
end end
end, end,
MoreOpts = case Scheme of MoreOpts = case Scheme of
<<"http">> -> "http" ->
[{transport_opts, [Inet]}]; [{transport_opts, [Inet]}];
<<"https">> -> "https" ->
KeyFile = maps:get(<<"keyfile">>, Params), KeyFile = maps:get(<<"keyfile">>, Params),
CertFile = maps:get(<<"certfile">>, Params), CertFile = maps:get(<<"certfile">>, Params),
CACertFile = maps:get(<<"cacertfile">>, Params), CACertFile = maps:get(<<"cacertfile">>, Params),