Skip to content

Commit

Permalink
fix: post trace failed
Browse files Browse the repository at this point in the history
  • Loading branch information
lsxredrain committed Oct 9, 2021
1 parent 1a53ebe commit 544eed5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# [](https://github.com/dgiot/dgiot/compare/v4.3.4...v) (2021-10-08)
# [](https://github.com/dgiot/dgiot/compare/v4.3.4...v) (2021-10-09)


### Bug Fixes

* add device log ([f3b173c](https://github.com/dgiot/dgiot/commit/f3b173c3f146e1ddf21038b5026dfd08ae93c95f))
* channel_log ([1e37058](https://github.com/dgiot/dgiot/commit/1e3705876eb905cab215085e7341e050ce822170))
* fix mqtt trace bug ([1a53ebe](https://github.com/dgiot/dgiot/commit/1a53ebec4ecf68ad2e19c14d43ed47fbcbed1754))
* task_worker bug ([0396163](https://github.com/dgiot/dgiot/commit/039616312126d24e36b03cf339e0e6ffb6f3aa13))


Expand Down
3 changes: 2 additions & 1 deletion apps/dgiot_api/src/handler/dgiot_system_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,15 @@ do_request(post_trace, #{<<"action">> := Action, <<"tracetype">> := Tracetype, <
Rtn =
case Action of
<<"start">> ->
?LOG(info,"Tracetype ~p, Handle ~p",[Tracetype,Handle]),
dgiot_tracer:add_trace({dgiot_utils:to_atom(Tracetype), Handle});
<<"stop">> ->
dgiot_tracer:del_trace({dgiot_utils:to_atom(Tracetype), Handle});
_Other ->
{error, _Other}
end,
case Rtn of
ok ->
true ->
{200, #{<<"code">> => 200, <<"msg">> => <<"SUCCESS">>}};
{error, Reason} ->
{400, #{<<"code">> => 400, <<"error">> => dgiot_utils:format("~p", [Reason])}}
Expand Down

0 comments on commit 544eed5

Please sign in to comment.