0

final is my remote host file which is very large and due to timeout problems in front-end, i want to run it in back-end.

   large.py
   link=urllib2.urlopen(final)

   backends: 
   name: mybackend
   class: B8 
   options: public, dynamic
   instances: 6
   start: large.py

  main.py <br>
  urllib2.urlrequest("/_ah/start")
Enigmadan
  • 3,398
  • 2
  • 23
  • 35
Niraj Kashyap
  • 232
  • 2
  • 8

2 Answers2

0

Use deferred library, it's taskqueue without needing to create handlers:

from google.appengine.ext import deferred
deferred.defer(yourfile.your_fetcher_method, _target='mybackend')

If you have params anything after the method to run without _ is a numbered params, or named params without underscore.

Faisal
  • 2,276
  • 15
  • 19
0

A basic handler could do this. You invoke the handler via the url on the backend instance. If you use urllib2 you have default timeouts. you can use urlfetch to set the timeout parameters to your needs. A basic project which invokes a handler on the backend is here.

quiet_penguin
  • 808
  • 7
  • 18
  • You are not getting this . .. i don't want my back-end node name to be print in back-end instance or front-end instance ... i want to run the code in back end – Niraj Kashyap Nov 26 '13 at 20:12