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

Priority with python-scrapyd-api #9

Open
vokhuongcse0604 opened this issue Dec 29, 2016 · 3 comments
Open

Priority with python-scrapyd-api #9

vokhuongcse0604 opened this issue Dec 29, 2016 · 3 comments
Assignees

Comments

@vokhuongcse0604
Copy link

I want to set priority for my spider.
I done when set on scrapyd:
curl http://localhost:6800/schedule.json -d project=myproject -d spider=somespider -d priority=1
How can i do like that on python-scrapyd-api?
Thanks.

@djm
Copy link
Owner

djm commented Jan 4, 2017

@vokhuongcse0604

Looks like priority was a non-documented feature until recently.

The code in scrapyd just pops the priority kwarg off the arguments sent, so this can be done with our API with no code changes:

scrapyd.schedule('myproject', 'somespider', priority=1.1)

Priority should be an integer or a float.


Having said no code changes: I will update the docs to state this, so I'll leave this ticket open for now.

@djm djm self-assigned this Jan 4, 2017
@Digenis
Copy link

Digenis commented Jan 5, 2017

I documented it in 1.1.1 after scrapy/scrapyd#144 (comment)
If you use priorities, make sure you checkout this pitfall scrapy/scrapyd#187
Things should change in scrapyd-1.3

@djm
Copy link
Owner

djm commented Jan 5, 2017

@Digenis Yup, that's what I meant by poorly worded "until recently". Thank you very much for doing it and that helpful extra comment.

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

No branches or pull requests

3 participants