[Twisted-Python] Best way to trigger a future connection with data

2013-07-18 Thread Nick Johnson
col. However, I cannot see how to pass in any extra information (ie the job-id) this way? I know I can store state in the Factory, so I guess I just need to know how to pass this to a scheduled invocation of the Protocol. Is anyone able to point me in the right direction here? Cheers, -Nick. -

Re: [Twisted-Python] Best way to trigger a future connection with data

2013-07-19 Thread Nick Johnson
Thanks lvh, I did have to override the buildProtocol method in the Factory but I then set Protocol.factory to be equal to the Factory (ie, myprotocol.factory=self). I'm still stuck however with what to do when I get more complex than this simple case. For example, I use a callingLoop to call mult

Re: [Twisted-Python] Best way to trigger a future connection with data

2013-07-19 Thread Nick Johnson
g about callbacks and deferreds but still get stuck with the same problem of how to instruct a particular instance of MyProtocol to either launch or retrieve a job. Cheers, -Nick. On 19/07/13 09:25, Laurens Van Houtven wrote: > On Fri, Jul 19, 2013 at 10:19 AM, Nick Johnson > mailto:nick.jo

Re: [Twisted-Python] Best way to trigger a future connection with data

2013-07-22 Thread Nick Johnson
Hi, Firstly, thanks for this gist, I had done a few experiments using endpoints and I think this is definitely the way to go for this code. As to the questions: source and destination are parameters for the job and might change between runs (a function I didn't include for brevity handles computa