Skip to content

Commit bdf85ad

Browse files
committed
refactor: rename delay param to after
1 parent 867946f commit bdf85ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dev_cron.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ once(_Msg1, Msg2, Opts) ->
3737
),
3838
Name = {<<"cron@1.0">>, ReqMsgID},
3939
Pid = spawn(fun() ->
40-
maybe <<DelayBin/binary>> ?= hb_ao:get(<<"delay">>, Msg2),
40+
maybe <<DelayBin/binary>> ?= hb_ao:get(<<"after">>, Msg2),
4141
DelaySecs = timer:seconds(hb_util:int(DelayBin)),
4242
timer:sleep(DelaySecs)
4343
end,
@@ -305,7 +305,7 @@ once_delayed_and_executed_test() ->
305305
% register the worker with the id
306306
hb_name:register({<<"test">>, ID}, PID),
307307
% Construct the URL path with the dynamic ID
308-
UrlPath = <<"/~cron@1.0/once?delay=1&test-id=", ID/binary,
308+
UrlPath = <<"/~cron@1.0/once?after=1&test-id=", ID/binary,
309309
"&cron-path=/~test-device@1.0/update_state">>,
310310
% this should call the worker via the test device
311311
% the test device should look up the worker via the id given

0 commit comments

Comments
 (0)