From 0ffbfbeb66e6dbac9dc94bb1e4db4f7467adb30c Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Thu, 19 Dec 2024 10:09:35 +0800 Subject: [PATCH] fix ai_router --- apps/iot/src/iot_device.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/iot/src/iot_device.erl b/apps/iot/src/iot_device.erl index 87a42d7..c19cc14 100644 --- a/apps/iot/src/iot_device.erl +++ b/apps/iot/src/iot_device.erl @@ -261,10 +261,9 @@ handle_cast({ai_event, EventType, Params}, State = #state{device_uuid = DeviceUU Timestamp = iot_util:current_time(), case Timestamp >= LastTimestamp + Interval of true -> - %% todo lager:debug("[iot_device] device_uuid: ~p, ai_event triggered last_timestamp: ~p, current_timestamp: ~p, interval is: ~p", [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)}}; false -> lager:debug("[iot_device] device_uuid: ~p, ai_event trigger less than interval: ~p, last_timestamp: ~p, current_timestamp: ~p",