scrapy-dotpersistence icon indicating copy to clipboard operation
scrapy-dotpersistence copied to clipboard

Configuration settings being overwritten?

Open pmyteh opened this issue 8 years ago • 1 comments
trafficstars

README.rst says that the bucket, access keys etc. can be configured in settings.py, but this doesn't seem to work in practice: whatever the value of the given settings in settings.py, the default ScrapingHub bucket seems to be chosen anyway. I suspect (but do not know) that the settings are being overridden by ScrapingHub.

There are decent reasons to want the option of storing elsewhere; I've been working on some middleware which needs persistent state, and it's difficult to debug if you don't have ready access to the state because it's held in someone else's S3 bucket!

I've had a stab at dealing with this by allowing specific DOTSCRAPY_* override settings (there's something in my fork at pmyteh/scrapy-dotpersistence) but it doesn't seem to be working when deployed to shub. Currently managing OK by subclassing the main class in my project code and substituting a replacement init() method, but that's obviously not ideal in the long run.

pmyteh avatar Mar 30 '17 20:03 pmyteh

ADDONS_S3_BUCKET, ADDONS_AWS_ACCESS_KEY_ID and ADDONS_AWS_USERNAME are overridden by Scrapy Cloud, so if you want to set up your own credentials, you need to define them in Scrapy Cloud UI.

rennerocha avatar Aug 21 '19 15:08 rennerocha