Close DB session before exiting method#2
Conversation
Prevents abandoned database connections when running `process_item`.
|
@dalepotter you are right - I totally agree! Since this repository seems not to be maintained anymore, I won't crate a pull request for this: Another issue: In the models.py is At the same token, Lastly, I think the declarative mapping has changed as well. I'm using SQLAlchemy for the first time today - so I'm not quite sure... |
|
Thanks guys - just no time to maintain this. |
|
no problem! The tutorial still was a good entry point for me 👍 |
I am glad you find it useful :) cheers. |
Prevents abandoned database connections when running
process_item.Tested manually by running
scrapy crawl quotestwice. Only 50 rows present in thequotetable after each run.