Skip to content

Commit

Permalink
Update type definition and app documentation as per actual implementa…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
Paulo Oliveira committed Feb 6, 2017
1 parent c56e25e commit 08bcb9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/jobs.hrl
Expand Up @@ -34,8 +34,8 @@
| {group_rates, [{q_name(), [option()]}]}
| {counters, [{q_name(), [option()]}]}
| {interval, integer()}
| {max_time, non_neg_integer()}
| {max_size, non_neg_integer()}.
| {max_time, integer() | undefined}
| {max_size, integer() | undefined}.
-type timestamp() :: integer(). % microseconds with a special epoch

-type q_name() :: any().
Expand Down
2 changes: 2 additions & 0 deletions src/jobs.erl
Expand Up @@ -159,11 +159,13 @@ job_info({_, Opaque}) ->
%%
%% * `{max_time, T}', specifies how long (in ms) a job is allowed to wait
%% in the queue before it is automatically rejected.
%% If `undefined', no limit is imposed.
%%
%% * `{max_size, S}', indicates how many items can be queued before requests
%% are automatically rejected. Strictly speaking, size is whatever the queue
%% behavior reports as the size; in the default queue behavior, it is the
%% number of elements in the queue.
%% If `undefined', no limit is imposed.
%%
%% * `{mod, M}', indicates which queue behavior to use. Default is `jobs_queue'.
%%
Expand Down
1 change: 1 addition & 0 deletions src/jobs_app.erl
Expand Up @@ -65,6 +65,7 @@
%% of job requests) of the queue. If the queue has reached the maximum length,
%% subsequent job requests will be rejected unless it is possible to remove
%% enough requests that have exceeded the maximum allowed time in the queue.
%% If `undefined', no limit is imposed.
%%
%% `{regulators, [{regulator_type(), Opts]}' specifies the regulation
%% characteristics of the queue.
Expand Down

0 comments on commit 08bcb9b

Please sign in to comment.