diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-11-27 11:49:47 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-11-27 12:12:34 -0500 |
commit | c19e7da20ca6b67956338f9808a80673e06b1e94 (patch) | |
tree | 5d62c7c7aaf71e062f8bf22cbce987b8555ad78b /src/lib/Bcfg2/Server/Plugins/Snapshots.py | |
parent | fbecb8553136649eaf563d4f7ec21553500e5f16 (diff) | |
download | bcfg2-c19e7da20ca6b67956338f9808a80673e06b1e94.tar.gz bcfg2-c19e7da20ca6b67956338f9808a80673e06b1e94.tar.bz2 bcfg2-c19e7da20ca6b67956338f9808a80673e06b1e94.zip |
Threaded plugin fixes:
* Added "Threaded" plugin interface for any plugin that uses threads
* Start plugin threads after daemonization
* Update existing plugins that use threads (Reporting, Snapshots, ThreadedStatistics interface)
* Update unit tests
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Snapshots.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Snapshots.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Snapshots.py b/src/lib/Bcfg2/Server/Plugins/Snapshots.py index 1956af4ad..cc5946bb2 100644 --- a/src/lib/Bcfg2/Server/Plugins/Snapshots.py +++ b/src/lib/Bcfg2/Server/Plugins/Snapshots.py @@ -65,6 +65,8 @@ class Snapshots(Bcfg2.Server.Plugin.Statistics): self.session = Bcfg2.Server.Snapshots.setup_session(core.cfile) self.work_queue = Queue() self.loader = threading.Thread(target=self.load_snapshot) + + def start_threads(self): self.loader.start() def load_snapshot(self): |