Skip to content

Commit d275d3f

Browse files
add till for process pid cache
1 parent f9fece0 commit d275d3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bpe_proc.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ init(Process) ->
8686
Proc = case kvs:get(process,Process#process.id) of
8787
{ok,Exists} -> Exists;
8888
{error,_} -> Process end,
89-
wf:cache({process,Proc#process.id},self()),
89+
Till = n2o_session:till(calendar:local_time(), wf:config(bpe,ttl,24*60*60)),
90+
wf:cache({process,Proc#process.id},self(),Till),
9091
[ wf:reg({messageEvent,Name,Proc#process.id}) || {Name,_} <- bpe:events(Proc) ],
9192
{ok, Proc#process{timer=erlang:send_after(crypto:rand_uniform(1,10000),self(),{timer,ping})}}.
9293

0 commit comments

Comments
 (0)