Windows mutex to prevent multiple instances
Dennis Lee Bieber
wlfraed at ix.netcom.com
Thu Aug 29 13:57:49 EDT 2002
Hans Nowak fed this fish to the penguins on Wednesday 28 August 2002
05:31 pm:
>
> It is important because the programs query the database, then write
some stuff
> back; running it multiple times simultaneously can (and obviously
will, as we
> have found) result in undesirable duplicate records.
>
Sounds more like you need to implement locking on the database side,
not the client side. What type of database? (IE, custom file or actual
DBMS).
Perhaps use an intermediate daemon -- only the daemon talks to the
database, the clients talk to the daemon (TCP/IP connections perhaps,
with an inactivity time-out). If the daemon only accepts one connection
at a time, the others should block or fail in some way.
--
--
> ============================================================== <
> wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed at dm.net | Bestiaria Support Staff <
> ============================================================== <
> Bestiaria Home Page: http://www.beastie.dm.net/ <
> Home Page: http://www.dm.net/~wulfraed/ <
More information about the Python-list
mailing list