From 96d0f116156d227dc3d5371edf7fb93e32828352 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Tue, 30 Jun 2015 20:56:00 -0500 Subject: [PATCH] add configurable frequency --- pickle_stat_reader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pickle_stat_reader.py b/pickle_stat_reader.py index dc75360..b03e313 100644 --- a/pickle_stat_reader.py +++ b/pickle_stat_reader.py @@ -8,7 +8,9 @@ from binascii import b2a_hex as h # This is the only user-configuration necessary # Tell the program where the pickle file is +# Tell the program how often to print a report stat_file = '../dmrlink_stats.pickle' +frequency = 30 def int_id(_hex_string): @@ -49,5 +51,5 @@ def print_stats(): if __name__ == '__main__': output_stats = task.LoopingCall(print_stats) - output_stats.start(10) + output_stats.start(frequency) reactor.run() \ No newline at end of file