Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Commit

Permalink
Merge bug26452
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon MacMullen committed Nov 4, 2014
2 parents 55211db + 0fc8780 commit c6a56b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rabbit_shovel_worker.erl
Expand Up @@ -232,14 +232,14 @@ make_conn_and_chan(URIs) ->
{ok, Chan} = amqp_connection:open_channel(Conn),
{Conn, Chan, list_to_binary(amqp_uri:remove_credentials(URI))}.

remaining(Ch, #shovel{delete_after = never}) ->
remaining(_Ch, #shovel{delete_after = never}) ->
unlimited;
remaining(Ch, #shovel{delete_after = 'queue-length', queue = Queue}) ->
#'queue.declare_ok'{message_count = N} =
amqp_channel:call(Ch, #'queue.declare'{queue = Queue,
passive = true}),
N;
remaining(Ch, #shovel{delete_after = Count}) ->
remaining(_Ch, #shovel{delete_after = Count}) ->
Count.

decr_remaining(_N, State = #state{remaining = unlimited}) ->
Expand Down

0 comments on commit c6a56b9

Please sign in to comment.