Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mocchira authored and yosukehara committed Jun 21, 2018
1 parent e2e6080 commit 3034755
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/leo_mq_consumer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ idling(#event_info{event = ?EVENT_DECR},
{next_state, ?ST_IDLING, State#state{status = ?ST_IDLING,
batch_of_msgs = BatchOfMsgs_1,
interval = Interval_1}};
idling(#event_info{event = ?EVENT_SUSPEND}, #state{publisher_id = PublisherId,
batch_of_msgs = BatchOfMsgs,
interval = Interval} = State) ->
NextStatus = ?ST_SUSPENDING_FORCE,
ok = leo_mq_api:update_consumer_stats(
PublisherId, NextStatus, BatchOfMsgs, Interval),
{next_state, NextStatus, State#state{status = NextStatus}};
idling(_, State) ->
{next_state, ?ST_IDLING, State#state{status = ?ST_IDLING}}.

Expand Down

0 comments on commit 3034755

Please sign in to comment.