nephos.maintenance.single_instance
index
/media/hdd/Essentials/Chapter_Kgp_WOrk/GSoC/projectnephos_gsoc18/GSoC18Nephos/nephos/maintenance/single_instance.py

Ensures only one Nephos running at a time.
Source: https://github.com/pycontribs/tendo/blob/master/tendo/singleton.py

 
Modules
       
fcntl
os
sys
tempfile

 
Classes
       
builtins.object
SingleInstance

 
class SingleInstance(builtins.object)
    Class that can be instantiated only once per machine.
If is there another instance already running it will throw a `SingleInstanceException`.
This works by creating a lock file with a filename based on the full path to the script file.
 
  Methods defined here:
__del__(self)
__init__(self, flavor_id='')
Instantiate the class with the checking and creation of PID file.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        LOG = <logging.Logger object>