On zaterdag 23 juni 2018 02:01:06 CEST Mike Dewhirst wrote: > Is there a python singleton pattern which might work?
No, cause the startup is done in 2 different processes which do not share state. So both processes will have a "new singleton". This is why you need an IPC mechanism, such as file locks or shared memory. In the case of one-off launchers, it's usually easier to implement the restrictions on the client side (the program being launched). Long running launchers (like inetd, systemd) can prevent double launch in other ways as they can keep their own state. -- Melvyn Sopacua -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/3828451.OQlbSIQ3MC%40fritzbook. For more options, visit https://groups.google.com/d/optout.