Skip to content

Actually **stopping** the Pub / Sub consumer on an exception. - #4498

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-4463-more
Nov 30, 2017
Merged

dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-4463-more

Conversation

@dhermes

@dhermes dhermes commented Nov 29, 2017

Copy link
Copy Markdown
Contributor

Fixes #4463.

@dhermes dhermes added api: pubsub Issues related to the Pub/Sub API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 29, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 29, 2017
self.stop_consuming()
except Exception as exc:
self.active = self._policy.on_exception(exc)
recover = self._policy.on_exception(exc)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

# We return and stop short of ``pop()``-ing so that the
# thread that invoked the current helper can properly stop
# it.
return

This comment was marked as spam.

@lukesneeringer lukesneeringer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants