Extend status api

This commit is contained in:
Gilbert Wong 2019-04-18 14:05:40 +08:00 committed by turtleDeng
parent 94aa173858
commit 5680b191ee
1 changed files with 4 additions and 2 deletions

View File

@ -186,8 +186,10 @@ ensure_stopped(Id, Timeout) ->
stop(Pid) -> gen_statem:stop(Pid).
status(Pid) ->
gen_statem:call(Pid, status).
status(Pid) when is_pid(Pid) ->
gen_statem:call(Pid, status);
status(Id) ->
status(name(Id)).
%% @doc This function is to be evaluated on message/batch receiver side.
-spec import_batch(batch(), fun(() -> ok)) -> ok.