Ah, OK, sorry I didn't read all the discussion. So I guess that if you keep that in a global variable, it won't work if your Django app is running in many processes. (Besides, global variables are rarely a good idea.)
If I understand the problem correctly, what I would do would probably be to touch a file whenever I make a change and examine the file modification date each time—if it's more recent than last time I checked, the data has been modified. Another option is to use the cache. For example, use memcached and store some data in there. IIRC the cache is shared among all instances of Django. Regards, Antonis Antonis Christofides http://djangodeployment.com On 2018-01-09 00:00, Kasper Laudrup wrote: > Hi Antonis, > > On 2018-01-08 22:46, Antonis Christofides wrote: >> OK, but why do you need this? What functionality is this going to have? >> > > As I wrote in my original question, I'm attempting to write a Django > application for managing DHCP leases and DNS entries. > > So, if a user changes an entry by modifying a model in Django, I need to > update some external files and restart a process so the new files will be > reread. > > I might be approaching this the wrong way, but I would really like my Django > application to "own" this process, so I would like a global instance of that > which I could start/restart/kill from my Django application. > > I'm perfectly open for other ways to solve this, it just seemed like a fairly > obvious way to do it, but I could very well be wrong. > > Thanks a lot and kind regards, > > Kasper Laudrup > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a504b4ac-1ee8-b39d-21a5-dc9042fef25e%40djangodeployment.com. For more options, visit https://groups.google.com/d/optout.

