Skip to content

Commit

Permalink
Merge pull request #338 from benrubson/issue-229
Browse files Browse the repository at this point in the history
Only restart long-lived collectors
  • Loading branch information
johann8384 authored Sep 14, 2016
2 parents d44283f + 0f8aa14 commit 70fa5e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ def check_children(options):
for col in all_living_collectors():
now = int(time.time())

if col.last_datapoint < (now - options.allowed_inactivity_time):
if ((col.interval == 0) and (col.last_datapoint < (now - options.allowed_inactivity_time))):
# It's too old, kill it
LOG.warning('Terminating collector %s after %d seconds of inactivity',
col.name, now - col.last_datapoint)
Expand Down

0 comments on commit 70fa5e2

Please sign in to comment.