diff options
author | Michael Fenn <fennm@deshawresearch.com> | 2013-10-09 15:59:42 -0400 |
---|---|---|
committer | Michael Fenn <fennm@deshawresearch.com> | 2013-10-09 15:59:42 -0400 |
commit | f813f86f8ac2bc7b55f4eb6a0d936f1ce4f68ba7 (patch) | |
tree | 62d2ee64f7c7adfe46089b9eda2cfd93cbc4d139 /src/lib/Bcfg2 | |
parent | cde00779a8d4d9c2624a3b82c6911ccf1cb2aaef (diff) | |
download | bcfg2-f813f86f8ac2bc7b55f4eb6a0d936f1ce4f68ba7.tar.gz bcfg2-f813f86f8ac2bc7b55f4eb6a0d936f1ce4f68ba7.tar.bz2 bcfg2-f813f86f8ac2bc7b55f4eb6a0d936f1ce4f68ba7.zip |
Reporting: Simple sanity check to avoid creating too many threads
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r-- | src/lib/Bcfg2/Reporting/Collector.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Reporting/Collector.py b/src/lib/Bcfg2/Reporting/Collector.py index 68e1d6a6d..f348a60dc 100644 --- a/src/lib/Bcfg2/Reporting/Collector.py +++ b/src/lib/Bcfg2/Reporting/Collector.py @@ -130,6 +130,9 @@ class ReportingCollector(object): continue t = ReportingStoreThread(interaction, self.storage) + while len(threading.enumerate()) > 100: + self.logger.info("more than 100 threads running, sleeping") + time.sleep(1) t.start() except (SystemExit, KeyboardInterrupt): self.logger.info("Shutting down") |