Skip to content

Commit

Permalink
added ability to toggle pump shutdown when all messages on a pump are…
Browse files Browse the repository at this point in the history
… processed.
  • Loading branch information
aribornstein committed Nov 19, 2017
1 parent 963be97 commit c18145b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eventhubsprocessor/eh_partition_pump.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ async def run(self):
logging.info("No events received, queue size %d, delivered %d",
self.eh_partition_pump.partition_receive_handler.messages.qsize(),
self.eh_partition_pump.partition_receive_handler.delivered)
await self.process_error_async(err)
# Handle close

if self.eh_partition_pump.host.eh_options.release_pump_on_timeout:
await self.process_error_async(err)
async def process_events_async(self, events):
"""
# This method is called on the thread that the EH client uses to run the pump.
Expand Down
1 change: 1 addition & 0 deletions eventhubsprocessor/eph.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ def __init__(self):
self.max_batch_size = 10
self.prefetch_count = 300
self.receive_timeout = 60
self.release_pump_on_timeout = True
self.initial_offset_provider = "-1"

0 comments on commit c18145b

Please sign in to comment.