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:
        ...



On Sun, Jun 1, 2014 at 10:27 PM, Michael <taomaili...@gmail.com> wrote:

> 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:
>
> http://pastebin.com/nt2zPWrU
>
> Here is the pyramid view and tweepy class that initiates the stream
> listening and DBSession.add() call. I was going to use celery but want to
> get the db call working first..
>
> http://pastebin.com/yH2krrfE
>
> finally, a log of the code running but missing the SQLite log success
> messages. I've confirmed that the .sqlite file doesn't contain the new data.
>
> http://pastebin.com/kJwizsbS
>
> Any ideas why there is no successful db call?
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy-alembic" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sqlalchemy-alembic+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to