Skip to content

Commit

Permalink
add till for process pid cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ZatolokinPavel committed Feb 25, 2016
1 parent f9fece0 commit d275d3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bpe_proc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ init(Process) ->
Proc = case kvs:get(process,Process#process.id) of
{ok,Exists} -> Exists;
{error,_} -> Process end,
wf:cache({process,Proc#process.id},self()),
Till = n2o_session:till(calendar:local_time(), wf:config(bpe,ttl,24*60*60)),
wf:cache({process,Proc#process.id},self(),Till),
[ wf:reg({messageEvent,Name,Proc#process.id}) || {Name,_} <- bpe:events(Proc) ],
{ok, Proc#process{timer=erlang:send_after(crypto:rand_uniform(1,10000),self(),{timer,ping})}}.

Expand Down

0 comments on commit d275d3f

Please sign in to comment.