Re: Best practices for where to work with SQLAlchemy

2011-05-20 Thread Alec Munro
I did indeed mean transaction.commit(). I'm happy to know that the transaction will be committed on it's own if I don't do it, I think I will take advantage of that. I'm also curious about this mortar_rdb thing... But other than that bit of trivia, any reasons I should structure my code differen

Best practices for where to work with SQLAlchemy

2011-05-19 Thread Alec Munro
So I have a few pylons and pyramid applications under my belt, almost all using SQLAlchemy. So far, I have gravitated towards doing all the SQLAlchemy work as part of the models themselves. Occasionally, this has led to design decisions that I otherwise wouldn't have made, like having code that aff

Re: Using Pyramid, POST request not returning anything.

2011-02-17 Thread Alec Munro
Well, it works in Firefox, so I blame Chrome. On Feb 17, 2:24 pm, Alec Munro wrote: > For some reason, posting to this from Chrome, using JQuery.post() > works, but doesn't return anything: > > @view_config(context=MyApp, renderer='json', request_method="POST"

Using Pyramid, POST request not returning anything.

2011-02-17 Thread Alec Munro
For some reason, posting to this from Chrome, using JQuery.post() works, but doesn't return anything: @view_config(context=MyApp, renderer='json', request_method="POST") def add_testbed(context, request): """Add a testbed, based on the parameters submitted.""" data = request.params add

Re: Proper procedure for creating scheduled tasks

2010-10-06 Thread Alec Munro
P SIGNED MESSAGE- > Hash: SHA1 > > On 5 Oct 2010, at 14:40, Alec Munro wrote: > > > I generally don't do anything to > > close the session. Should I? If so, what? > > You could try "Session.remove()" as per: > > http://bitbucket.org/bbangert/p

Proper procedure for creating scheduled tasks

2010-10-05 Thread Alec Munro
Hi List, I have a situation where my Pylons app needs to do something every minute, while still being responsive to client requests. My solution to this was to create a thread within app_globals, and have this thread do it's thing, then sleep for a minute. Functionally, this does appear to do wha

Re: Programmatically shutting down Pylons server

2010-04-30 Thread Alec Munro
Ok, the problem seems to be that fact that the file being run is a batch file. I printed out the resulting java call, and used that instead, and it works. However, now I need to modify my script to handle some of what jython.bat does. Ah well. -- You received this message because you are subscrib

Re: Programmatically shutting down Pylons server

2010-04-30 Thread Alec Munro
On Apr 24, 6:13 pm, Philip Jenvey wrote: > On Apr 22, 2010, at 12:36 AM, Alec Munro wrote: > > > Hi List, > > > I have a Java class that I need to access from Python, and my solution > > for the time being is to wrap it in a Jython web service, using > > Pylo

Programmatically shutting down Pylons server

2010-04-22 Thread Alec Munro
Hi List, I have a Java class that I need to access from Python, and my solution for the time being is to wrap it in a Jython web service, using Pylons. I'm using subprocess.Popen to start this server, but I need a good way to stop it. Using any of the kill functionality from subprocess or the win3

Integrating sqlalchemy-migrate with setup-app

2010-04-09 Thread Alec Munro
Hi List, I had a bit of trouble figuring out how sqlalchemy-migrate worked at first, but now that I've got it, it seems pretty useful. But because we require default data for one of our pylons apps, but not the another, our installation processes were different. In the former, we would do this: p

Where to put installation-specification configuration?

2010-04-09 Thread Alec Munro
Hi List, We have a couple pylons-based projects that we distribute along with configuration files for production, development, and testing. Some of the values in these files are specific to the machine that they are installed on, which means when we update from version control, we have to merge th

Speed of HTTP uploading

2009-07-06 Thread Alec Munro
Hi List, We are finding HTTP uploading to be fairly inefficient for relatively large data sets. Specifically, uploading several hundred files, totaling 30MB, takes over 5 minutes. This is over a local network connection. Is this simply a consequence of using HTTP for uploads, or is there somethin