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

Renovate scrapy upstart job a bit #57

Merged
merged 2 commits into from Jan 14, 2015
Merged

Renovate scrapy upstart job a bit #57

merged 2 commits into from Jan 14, 2015

Conversation

CameronNemo
Copy link
Contributor

No need to redirect stdout/err, upstart will catch that. Use chdir stanza to keep up to date with init script, do not source empty/useless defaults file.

No need to redirect stdout/err, upstart will catch that. Use chdir stanza to keep up to date with init script, do not source empty/useless defaults file.
@pablohoffman
Copy link
Member

Does upstart provide an alternative to the defaults file?. It is common to pre-populate some environment vars there.

@CameronNemo
Copy link
Contributor Author

You can use override files for that. All you need to do is make a file scrapyd.override in the same directory (/etc/init) and add lines like env VAR1=val1. You can also put stuff like limit nofile 1024 4096 where 1024 is the soft resource limit for the number of file descripters, and 4096 is the hard limit. In the latest release of Upstart, you can actually add cgroup constraints too.

By environment vars, I take it scrapy reads them itself, right? A default file is usually used to configure how the init script operates, not how the daemon operates. So you would have vars like DAEMON_ARGS that the init script would append to the daemon's arguments, but that variable would not be exported to the daemon. That is the usual use case.

@dangra
Copy link
Member

dangra commented Jul 28, 2014

You can use override files for that. All you need to do is make a file scrapyd.override in the same directory (/etc/init)

interesting tip! is this possible in the version of upstart shipped with ubuntu lucid?

@CameronNemo
Copy link
Contributor Author

No, it was added in Upstart 0.9 (0.6.5 is in lucid). Sorry, I did not think about older releases. I have added back the default file sourcing.

@jayzeng
Copy link
Contributor

jayzeng commented Jan 14, 2015

LGTM, @pablohoffman good to merge?

@dangra
Copy link
Member

dangra commented Jan 14, 2015

LGTM.

pablohoffman added a commit that referenced this pull request Jan 14, 2015
Renovate scrapy upstart job a bit
@pablohoffman pablohoffman merged commit db63898 into scrapy:master Jan 14, 2015
@Digenis Digenis mentioned this pull request Jun 7, 2016
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.

None yet

4 participants