add debug
This commit is contained in:
parent
dcd780ba5d
commit
04e620ffec
@ -262,8 +262,8 @@ handle_cast({ai_event, EventType, Params}, State = #state{device_uuid = DeviceUU
|
|||||||
case Timestamp >= LastTimestamp + Interval of
|
case Timestamp >= LastTimestamp + Interval of
|
||||||
true ->
|
true ->
|
||||||
%% todo
|
%% todo
|
||||||
lager:debug("[iot_device] device_uuid: ~p, ai_event triggered last_timestamp: ~p, current_timestamp: ~p",
|
lager:debug("[iot_device] device_uuid: ~p, ai_event triggered last_timestamp: ~p, current_timestamp: ~p, interval is: ~p",
|
||||||
[DeviceUUID, LastTimestamp, Timestamp]),
|
[DeviceUUID, LastTimestamp, Timestamp, Interval]),
|
||||||
% iot_ai_router:route_uuid(DeviceUUID, EventType, Params),
|
% iot_ai_router:route_uuid(DeviceUUID, EventType, Params),
|
||||||
{noreply, State#state{ai_event_ttl = maps:put(EventType, Timestamp, EventTTL)}};
|
{noreply, State#state{ai_event_ttl = maps:put(EventType, Timestamp, EventTTL)}};
|
||||||
false ->
|
false ->
|
||||||
@ -272,6 +272,7 @@ handle_cast({ai_event, EventType, Params}, State = #state{device_uuid = DeviceUU
|
|||||||
{noreply, State}
|
{noreply, State}
|
||||||
end;
|
end;
|
||||||
error ->
|
error ->
|
||||||
|
lager:debug("[iot_device] device_uuid: ~p, ai_event type: ~p not limited", [DeviceUUID, EventType]),
|
||||||
iot_ai_router:route_uuid(DeviceUUID, EventType, Params),
|
iot_ai_router:route_uuid(DeviceUUID, EventType, Params),
|
||||||
{noreply, State}
|
{noreply, State}
|
||||||
end.
|
end.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user