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

document spider.closed() shortcut #719

Merged
merged 1 commit into from Jun 3, 2014
Merged

document spider.closed() shortcut #719

merged 1 commit into from Jun 3, 2014

Conversation

@Digenis
Copy link
Member

@Digenis Digenis commented May 12, 2014

See:

def close_spider(self, spider, reason):
closed = getattr(spider, 'closed', None)
if callable(closed):
return closed(reason)

@Digenis
Copy link
Member Author

@Digenis Digenis commented May 12, 2014

I would like to hear thoughts on my suggestion for an other method: I would use an "idle" shortcut to spider_idle. Shall I write another PR for this?

@dangra
Copy link
Member

@dangra dangra commented May 15, 2014

LGTM

@dangra
Copy link
Member

@dangra dangra commented May 15, 2014

I would like to hear thoughts on my suggestion for an other method: I would use an "idle" shortcut to spider_idle. Shall I write another PR for this?

I like the idea of adding a shortcut for spider_idle signal, specially because handling the logic of prevent closing the spider can be daunting for newcomers.

@Digenis
Copy link
Member Author

@Digenis Digenis commented Jun 1, 2014

I have not added a commit for spider.idle() to the PR because the API also lacks documentation for the engine.crawl() call.
I think this needs documentation first and by documentation I mean "a promise" that the API won't change on this matter.

dangra added a commit that referenced this pull request Jun 3, 2014
document spider.closed() shortcut
@dangra dangra merged commit 7752074 into scrapy:master Jun 3, 2014
1 check failed
1 check failed
continuous-integration/travis-ci The Travis CI build failed
Details
@dangra
Copy link
Member

@dangra dangra commented Jun 3, 2014

spider idle shortcut discussion moved to #740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.