feat: sync_parse sleep

This commit is contained in:
dawnwinterLiu 2022-05-09 20:25:35 +08:00
parent 881d46e130
commit 3568200cac

View File

@ -167,7 +167,7 @@ handle_message({sync_parse, _Pid, 'after', post, _Token, <<"Product">>, QueryDat
%% io:format("~s ~p ~p ~p ~n", [?FILE, ?LINE, Pid, QueryData]),
dgiot_product_hook:post('after', QueryData),
dgiot_product:save(QueryData),
timer:sleep(1000),
timer:sleep(100),
ProductId = maps:get(<<"objectId">>, QueryData),
dgiot_product:do_td_message(ProductId),
{ok, State};
@ -176,7 +176,7 @@ handle_message({sync_parse, _Pid, 'after', put, _Token, <<"Product">>, QueryData
%% io:format("~s ~p ~p ~p ~n", [?FILE, ?LINE, Pid, QueryData]),
dgiot_product_hook:put('after', QueryData),
dgiot_product:put(QueryData),
timer:sleep(1000),
timer:sleep(100),
ProductId = maps:get(<<"objectId">>, QueryData),
dgiot_product:do_td_message(ProductId),
{ok, State};
@ -185,8 +185,6 @@ handle_message({sync_parse, _Pid, 'after', delete, _Token, <<"Product">>, Object
%% io:format("~s ~p ~p ~p ~n", [?FILE, ?LINE, Pid, ObjectId]),
dgiot_product_hook:delete('after', ObjectId),
dgiot_product:delete(ObjectId),
timer:sleep(1000),
dgiot_product:do_td_message(ObjectId),
{ok, State};
handle_message(Message, State) ->