fix
This commit is contained in:
parent
24019f4ceb
commit
9d27ba3a6a
@ -29,14 +29,7 @@ init([]) ->
|
||||
SupFlags = #{strategy => one_for_one, intensity => 1000, period => 3600},
|
||||
|
||||
ChildSpecs = [
|
||||
#{
|
||||
id => 'dimension_apn_pusher',
|
||||
start => {'dimension_apn_pusher', start_link, []},
|
||||
restart => permanent,
|
||||
shutdown => 2000,
|
||||
type => worker,
|
||||
modules => ['dimension_apn_pusher']
|
||||
}
|
||||
|
||||
],
|
||||
|
||||
{ok, {SupFlags, pools() ++ ChildSpecs}}.
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
test() ->
|
||||
{ok, Pid} = start_link(),
|
||||
UserId = <<"">>,
|
||||
DeviceToken = <<"7fd3df4063670d945490cdaf511dedff8c56679c5c504af946806f78d002e8cf">>,
|
||||
UserId = <<"9df4dbb1-aff7-4caa-9adb-cb426a7dbcca">>,
|
||||
DeviceToken = <<"45fb2f5c960ab3c0b235088a87bfa5cddcb1109aa50f70c9b0fdd3d9482ec10a">>,
|
||||
Title = <<"动物狂响曲"/utf8>>,
|
||||
Body = <<"第7集(校服与被毛更深处),bilibili已更新"/utf8>>,
|
||||
|
||||
@ -148,7 +148,7 @@ code_change(_OldVsn, State = #state{}, _Extra) ->
|
||||
%%%===================================================================
|
||||
|
||||
push_task(ApnsPid, UserId, Title, Body, CustomData, Headers)
|
||||
when is_pid(ApnsPid), is_binary(UserId), is_binary(Title), is_binary(Body), is_map(CustomData) ->
|
||||
when is_pid(ApnsPid), is_binary(UserId), is_binary(Title), is_binary(Body), is_map(CustomData), is_map(Headers) ->
|
||||
|
||||
case mnesia_device_token:get_token(UserId) of
|
||||
error ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user