Please rethink your design! There is certainly no need for a global variable. There is may be a way to implement your requirement as a singleton that is being able to deliver the huge bag of data in a much more smarter way.

Am 18.06.2010 um 20:17 schrieb aurphir <ranavis...@gmail.com>:

In my django application I have a global variable 'gv' which is
accessed by different requests coming from the end users.

Now 'gv' holds a data of 2 MB size which needs to be update at regular
interval, pulling 2 MB data from the database for every request
doesn't make sense.

For this I have planned to use celery as a scheduler which will do the
update but looks like it runs as a different process and can't access
'gv'!
What could be possible ways where celery can update 'gv'? I can think
of calling a url from celery which updates 'gv' but not sure if this
is the right way of doing it.

Appreciate your responses

Thanks
Vishal

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


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

Reply via email to