Skip to content

Commit

Permalink
Merge pull request #26 from synlay/feature/erlcron_cancel_fix
Browse files Browse the repository at this point in the history
Wrong return type for ecrn_control:internal_cancel/1
  • Loading branch information
ericbmerritt committed Jan 8, 2014
2 parents 2ebd2de + 61eb30d commit 40a022d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/ecrn_app.erl
Expand Up @@ -57,7 +57,5 @@ setup() ->
erlcron:cron(CronJob)
end, Crontab);
undefined ->
ok;
Reason ->
error_logger:error_msg("Unknown crontab in configfile: ~p~n", [Reason])
ok
end.
4 changes: 2 additions & 2 deletions src/ecrn_control.erl
Expand Up @@ -35,7 +35,7 @@
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).

-spec cancel/1 :: (erlcron:job_ref()) -> ok.
-spec cancel/1 :: (erlcron:job_ref()) -> ok | undefined.
cancel(AlarmRef) ->
gen_server:call(?SERVER, {cancel, AlarmRef}).

Expand Down Expand Up @@ -112,5 +112,5 @@ internal_cancel(AlarmRef) ->
undefined ->
undefined;
{ok, [Pid]} ->
{ok, ecrn_agent:cancel(Pid)}
ecrn_agent:cancel(Pid)
end.
2 changes: 1 addition & 1 deletion src/erlcron.erl
Expand Up @@ -90,7 +90,7 @@ once(When, Fun) ->

%% @doc
%% Cancel the job specified by the jobref.
-spec cancel/1 :: (job_ref()) -> ok.
-spec cancel/1 :: (job_ref()) -> ok | undefined.
cancel(JobRef) ->
ecrn_control:cancel(JobRef).

Expand Down

0 comments on commit 40a022d

Please sign in to comment.