On 23/06/2018 6:17 PM, Melvyn Sopacua wrote:
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.
OK. That's very clear. Thank you Melvyn.
Cheers
Mike
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.
--
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/968115a0-5e2a-c141-cf17-fa6de4a65583%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.