Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reader: by default, archive failed messages to disk #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jehiah
Copy link
Member

@jehiah jehiah commented Nov 23, 2015

This is a follow up to #134 and changes the default behaviour of Reader.give_up() to be less surprising by writing messages that are "given up on" to disk instead of dropping them completely.

@jehiah jehiah added the feature label Nov 23, 2015
@jehiah
Copy link
Member Author

jehiah commented Nov 23, 2015

RFR @mreiferson. I'd love any naming comments you have, and if you can think of an obvious way to disable this (an additional parameter of archive_abandoned_messages=True ?)

logger.warning('[%s] giving up on message %s after %d tries (max:%d) %r',
self.name, message.id, message.attempts, self.max_tries, message.body)

self.failed_count += 1
Copy link
Member

Choose a reason for hiding this comment

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

I don't see where this is being initialized?

Copy link
Member Author

Choose a reason for hiding this comment

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

haha. just copy & pasting from my custom giving_up() here. I'll try some real validation =)

@mreiferson
Copy link
Member

@jehiah should we also bump max_attempts to 25?

@mreiferson
Copy link
Member

Do we need to provide a param to disable archiving when we already encourage users to subclass and override the method?

@mreiferson
Copy link
Member

what're we doing on this one?

@jehiah jehiah self-assigned this Feb 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants