[Twisted-Python] Twistd, tac and Logging

2009-09-16 Thread mardiros
Hi, I have written an Twisted app in a tac file which use a custom LogObserver and I'd like to turn off the output of twistd. First, I 've tried something like this  ( a Debian initd service file ) TACFILE=/opt/email2sms/email2smsd.tac DAEMON=/usr/bin/twistd PIDFILE=/var/run/mytac.pid SCRIPTNA

[Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread Dimitri Vorona
Hi, i'd like to be able to start additional instances of my server using multiprocess module. To do it i just start a new Process with mutiprocessing and then create a new instance of my Application there. Everything works fine, but i can't figure out a way to stop such a process. If I run reactor

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread Phil Mayers
Dimitri Vorona wrote: > Hi, > > i'd like to be able to start additional instances of my server using > multiprocess module. To do it i just start a new Process with > mutiprocessing and then create a new instance of my Application there. > Everything works fine, but i can't figure out a way to > s

[Twisted-Python] Twisted Trial (unittest) and Ant

2009-09-16 Thread Valeriy Pogrebitskiy
I am trying to implement Ant build.xml script that would include testing Python code using twisted.trial.unittest. When using available pyAntTasks ( target), I am getting all sorts of errors - even though test scripts complete successfully using Python directly, or using Eclipse's' Run As -

Re: [Twisted-Python] run queries in deffered, but not in transaction

2009-09-16 Thread Pet
On Tue, Sep 15, 2009 at 6:21 PM, Pet wrote: > On Tue, Sep 15, 2009 at 5:19 PM, Mark Visser wrote: >> exar...@twistedmatrix.com wrote: >>> On 10:37 am, petshm...@googlemail.com wrote: I'd like to run several queries in background, some of them may fail. >>> >>> If you have a functio

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread David Yoakley
Dimitri Vorona wrote: > Hi, > > i'd like to be able to start additional instances of my server using > multiprocess module. To do it i just start a new Process with > mutiprocessing and then create a new instance of my Application there. > Everything works fine, but i can't figure out a way to > st

Re: [Twisted-Python] network server on multiprocessor hardware

2009-09-16 Thread Kevin Horn
On Sat, Sep 5, 2009 at 9:07 AM, Bokhan Artem wrote: > Laurens Van Houtven пишет: > > Are you sure it's dying out because of CPU limitations? > > Yes, with 1k req/s cpu is 100% busy with python. > > > Can you show any real applications where this happens? > > I do not have real application in pyth

Re: [Twisted-Python] Using reactor with multiple processes

2009-09-16 Thread James Y Knight
On Sep 16, 2009, at 12:33 PM, David Yoakley wrote: > Thanks Phil for the reference to ampoule. We will look at that > next. We are still hoping to get the parent set up in such a way > that whatever the forking :-) shared state is, it does not get > established until after the children are

Re: [Twisted-Python] run queries in deffered, but not in transaction

2009-09-16 Thread Matt Perry
Make sure you're using the @inlineCallbacks decorator and the yield statement referenced previously. Without those you're just adding several callbacks to the same Deferred; with them, the function will wait until the Deferred fires before continuing. def logRequest(self, *arg, **kw): obj = co

Re: [Twisted-Python] run queries in deffered, but not in transaction

2009-09-16 Thread Pet
On Thu, Sep 17, 2009 at 4:35 AM, Matt Perry wrote: > Make sure you're using the @inlineCallbacks decorator and the yield > statement referenced previously.  Without those you're just adding several > callbacks to the same Deferred; with them, the function will wait until the > Deferred fires befor