Skip to content

Commit

Permalink
Merge pull request #13 from GameAnalytics/fix_specs
Browse files Browse the repository at this point in the history
Correcting type specs
  • Loading branch information
sata authored Dec 14, 2017
2 parents 015b15e + 135bce0 commit 9f5b45b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gascheduler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
%% Types
-type worker_nodes() :: [node()].
-type max_workers() :: non_neg_integer().
-type max_retries() :: pos_integer().
-type max_retries() :: pos_integer() | infinity.
-type client() :: pid().
-type pending() :: queue:queue(mfa()).
-type running() :: [{pid(), mfa()}].
Expand Down Expand Up @@ -92,7 +92,7 @@ start_link(Nodes, Client, MaxWorkers, MaxRetries) ->
stop(Name) ->
gen_server:call(Name, stop).

-spec execute(atom(), mfa()) -> ok.
-spec execute(atom(), {module(), atom(), [term()]}) -> ok.
execute(Name, MFA) ->
gen_server:call(Name, {execute, MFA}).

Expand Down Expand Up @@ -353,7 +353,7 @@ log_permanent_failure(Type, Error, MFA) ->


%% Executes MFA MaxRetries times
-spec execute_do(mfa(), non_neg_integer() | infinity, non_neg_integer()) -> result().
-spec execute_do(mfa(), max_retries(), non_neg_integer()) -> result().
execute_do(_MFA, 0, _RetryTimeout) ->
{error, max_retries};
execute_do(MFA = {Mod, Fun, Args}, infinity, RetryTimeout) ->
Expand Down

0 comments on commit 9f5b45b

Please sign in to comment.