[IPython-user] Persistence ipcontroller and ipengines

Vishal Vatsa vishal.vatsa@gmail....
Sat Feb 7 09:03:35 CST 2009


Hi Franz,

So once you have your StringTask st,
you need an TaskClient, since you need to run
an asyncclient, (you will need to read up on twisted defered objects).


from IPython.kernel import asyncclient

st = asyncclient.StringTask(some params)

def submit_job(client):
    defered = client.run(st)

defered_client = asyncclient.get_task_client()
defered_client.addCallback(submit_job)


Hope the above example makes sense. It does get a little bit complex
when dealing with asyncclient, as just about every thing is a defered.

-vishal
2009/2/7 Franz Zieher <franz.zieher@gmail.com>:
>
>
> Hi Vishal,
>
> thanks for the hint.
> As you pointed out, twisted is interesting.
> I tried to run my StringTask in the following way
>
> st = asyncclient.StringTask(script,pull=pullObjs,push=pushObjs)
> tc = asyncclient.get_task_client(self.furl)
> tid = tc.run(st)
> res = tc.get_task_result(tid,block=True)
>
> It turned out that tc does not have a run methon :-(
>
> Do you have an example on how I would run the above.
> Thanks
>
> Franz
>
>
>
>
>
> Vishal Vatsa-2 wrote:
>>
>> Hi
>>
>> I don't think that there is any major problems with
>> long running ipcontroller/engines, though i would
>> say call clear on you controller every so often.
>>
>> The longest run i have had so far is about a month.
>>
>> If you want to run a client from another reactor,
>> Use the asyncclient, twisted is interesting :)
>>
>> If you need more information, please ask.
>>
>> Regards,
>> -Vishal
>>
>> ----- Original message --
>> I have a couple of questions related to that procedure
>> - Is it wise to have long running ipcontroller/ipengines?
>> - Can the IPython.kernel.client be used within moin run by twisted (the
>> reactor is started by moin)?
>> - Are there any precautions (cleanups) that shall be performed before
>> launching the StringTask
>>
>> An early form of the parser can be found at
>> http://moinmo.in/ParserMarket/matplotlib
>>
>> Thanks for any thoughts on that.
>>
>> Franz
>> --
>> View this message in context:
>> http://www.nabble.com/Persistence-ipcontroller-and-ipengines-tp21800901p21800901.html
>> Sent from the IPython - User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> IPython-user mailing list
>> IPython-user@scipy.org
>> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>>
>>
>> _______________________________________________
>> IPython-user mailing list
>> IPython-user@scipy.org
>> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Persistence-ipcontroller-and-ipengines-tp21800901p21888368.html
> Sent from the IPython - User mailing list archive at Nabble.com.
>
> _______________________________________________
> IPython-user mailing list
> IPython-user@scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>


More information about the IPython-user mailing list