Skip to content

Conversation

@complikator
Copy link
Contributor

You can add deltafetch_ignore to your request metadata if you don't want to treat request as visited.

return to_bytes(key)

def _is_ignored(self, request):
return request.meta.get('deltafetch_ignore') is not None
Copy link

Choose a reason for hiding this comment

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

request.meta.get('deltafetch_ignore', False)


# 'test_key_1' is already in the test db --> it should be skipped
Request('http://url1', meta={'deltafetch_key': 'test_key_1'})
Request('http://url1', meta={'deltafetch_key': 'test_key_1'}),
Copy link

Choose a reason for hiding this comment

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

put this stuff into new test function

@pawelmhm
Copy link
Collaborator

Looks good, thanks @complikator I'll review and check if we can add it to next release coming

@pawelmhm
Copy link
Collaborator

I added docs and changed setting name, adjusted tests and merged your work here #44

Thanks very much for this contribution!

@pawelmhm pawelmhm closed this Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants