How do I update a global variable?
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-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home