On Jun 18, 7:17 pm, aurphir <ranavis...@gmail.com> wrote: > 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
I'm having trouble thinking of any use case that would require the keeping of a 2mb global variable in memory, but no doubt you have your reasons. You probably want something like memcached, which both Django and celery can talk to directly through the caching framework. -- DR. -- 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.