Re: DBSession.add() has no effect in tweepy callback in pyramid 1.5

2014-06-03 Thread Michael
Yes, this fixed my issue, thanks. Intermittently celery will raise this exception: Task twitcel.queue.tasks.store_tweet[e460a4b0-7a88-45ee-b5f7-66de5fb8be1b] raised unexpected: OperationalError('(OperationalError) disk I/O error',) I'm currently storing to an sqlite database for development pur

Re: DBSession.add() has no effect in tweepy callback in pyramid 1.5

2014-06-01 Thread Michael Merickel
Presumably you do not have the pyramid_tm tween active in your pyramid configuration which will perform commits at the end of requests: config.include('pyramid_tm') If you are running a script, you'd want to do your database actions inside of a tm block: with transaction.manager:

DBSession.add() has no effect in tweepy callback in pyramid 1.5

2014-06-01 Thread Michael
Hi all, I'm trying to store tweets into an sqlite db and when I call DBSession.add() to store it, it seems to do nothing. Here is a trace of me setting up the db: http://pastebin.com/tB4KLLXj Here is how I set up the model in __init__.py http://pastebin.com/DVS78C5b Here is the Tweet class: