It might not be exactly what you need, but there is Django Queue
Service (http://code.google.com/p/django-queue-service/)
I've implemented it in our django application to provide a queue
service to do backend processes. Our app is a mercurial manager, and
I built a queue to handle our remote cloning requests. There is a
queue called 'repoclone' and when a user creates on, this is the
workflow:
1. User creates request to clone remote repository
2. Django checks details are valid
3. Creates a message in the 'repoclone' queue
4. Django saves the instance of the repo details in the database with
created = False
5. Cron runs every 1 min, poping the next message off the queue
6. Django reads the queue JSON and decodes, grabs the repo information
from the database
7. Does the clone request
8. Updates the database to advise the clone has been created.
Hope that helps.
--
Tane Piper
Blog - http://digitalspaghetti.me.uk
Skype: digitalspaghetti
Wii: 4734 3486 7149 1830
This email is: [ ] blogable [ x ] ask first [ ] private
what does the end user have to do with this?
you have a server by doing
wget http://svn.cherrypy.org/trunk/cherrypy/wsgiserver/__init__.py -O
wsgiserver.py
and setting up xml-rpc is not much more than this...i did this recently at
https://help.ubuntu.com/community/UMEGuide/ApplicationDevelopment/GPSEnabledWebApplication
and it is pretty simple to do (and really the best way IMO to run
background processes)
Ian
If you want to give the user feedback on what's happening, you might
consider maintaining a state message like "in progress" or such within
Django that can be polled via an Ajax call or the like.
-joe