[CentralOH] Another Revision of Singleton

Eric Floehr eric at intellovations.com
Tue Mar 19 16:15:04 CET 2013


John,

I only wanted to make the main application a singleton to make sure there
> could not be more than one. Going to dive into the alex.it link now, but
> what do you think?
>

I'm not sure I have enough to make a definitive recommendation, but if this
is a web app, I would think your best bet would be to make your admin app a
module. Django uses modules to represent apps as well.

Now, with that said, if you *REALLY* want to keep only one instance
running, neither your original approach nor any that I've described will
keep you from firing up multiple *processes* each with a running admin app.
If you need that level of protection you're going to want to use an
OS-level solution like a pid lock file, etc.

-Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20130319/3832fdd7/attachment.html>


More information about the CentralOH mailing list