Some initial thoughts using the task queue api:

1. It is very easy to create a chain reaction if you don't know what
you are doing :P

2. Using the queues with the dev_appservery.py is very nice such that
you can test things out and see how things get queued.

3. Would like to see flush queue option (or something) in the
production server, as well as to look at the queue.

4. My (horrible) first try at queues with production data spawned a
lot of tasks, most of which now I wish I could just remove and start
over.

5. It seemed like I generated 10x tasks then what I was expecting, not
sure if that is my mistake, but it didn't seem to have this order of
magnitude when I tried with development data, so I am not sure if that
is my fault or what.

6. Currently my queue is stuck and not progressing, again, not sure if
that is my fault or not.

Thanks again, the API itself it drop dead simple and fun.

-t

On Jun 20, 12:38 am, CaiSong <xs23...@gmail.com> wrote:
> -------------------------------------------------------------------------------------------------
> from google.appengine.dist import use_library
> use_library('django', '1.0')
> import logging, os
> # Google App Engine imports.
> from google.appengine.ext.webapp import util
>
> # Force Django to reload its settings.
> from django.conf import settings
> settings._target = None
>
> # Must set this env var *before* importing any part of Django
> os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
>
> import django.core.handlers.wsgi
> import django.core.signals
> import django.db
> import django.dispatch.dispatcher
>
> def log_exception(*args, **kwds):
>     logging.exception('Exception in request:')
>
>     # Log errors.
>     django.dispatch.dispatcher.connect(
>        log_exception, django.core.signals.got_request_exception)
>
>     # Unregister the rollback event handler.
>     django.dispatch.dispatcher.disconnect(
>         django.db._rollback_on_exception,
>         django.core.signals.got_request_exception)
>
> def main():
>     # Re-add Django 1.0 archive to the path, if needed.
> #    if django_path not in sys.path:
> #        sys.path.insert(0, django_path)
>
>     # Create a Django application for WSGI.
>     application = django.core.handlers.wsgi.WSGIHandler()
>
>     # Run the WSGI CGI handler with that application.
>     util.run_wsgi_app(application)
>
> if __name__ == '__main__':
>     main()
> -------------------------------------------------------------------------------------------------
>
> On Jun 19, 7:05 pm, Ubaldo Huerta <uba...@gmail.com> wrote:
>
> > Regarding django support.
>
> > Is it 1.02 support or just 1.0 support?
>
> > I'm currently using zip import (which slows things down significantly
> > when app instance is cold). The release notes says that django needs
> > to be installed. But where? Is 0.96 removed?
>
> > On Jun 19, 11:51 am, Paul Kinlan <paul.kin...@gmail.com> wrote:
>
> > > Barry,
> > > I believe your treat each task as a webrequest and at the moment there is 
> > > a
> > > 10K limit 
> > > (http://code.google.com/appengine/docs/python/taskqueue/overview.html) on 
> > > the
> > > size of task items.  I believe the best course of action is to stash them 
> > > in
> > > memcache (although I am sure you may get instances where it might be 
> > > removed
> > > from memcache) - from what I understand enqueing on
> > > to the task queue is a lot faster than storing a temp object in the
> > > data store, depending
> > > on the reason for you using the
> > > queue, persisting the object to the datastore might negate some of its
> > > usefulness.
>
> > > I think some experimentation is needed.
>
> > > Paul
>
> > > 2009/6/19 Barry Hunter <barrybhun...@googlemail.com>
>
> > > > Excellent!
>
> > > > Is there any limits on the 'params' structure in the task queue?
>
> > > > Can we (should we!?!) pass around really big data via this, or would
> > > > it be best stored in memcache (for example) and just the key passed?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to