Skip to content

Commit

Permalink
summary: logs summary.dat shelve usage
Browse files Browse the repository at this point in the history
  • Loading branch information
m-schmoock committed Jun 24, 2021
1 parent b862247 commit 37022fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions summary/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,12 @@ def init(options, configuration, plugin):
plugin.avail_window = 60 * 60 * int(options['summary-availability-window'])
plugin.persist = shelve.open('summary.dat', writeback=True)
if 'peerstate' not in plugin.persist:
plugin.log("Creating a new summary.dat shelve", 'debug')
plugin.persist['peerstate'] = {}
plugin.persist['availcount'] = 0
else:
plugin.log(f"Reopened summary.dat shelve with {plugin.persist['availcount']} "
f"runs and {len(plugin.persist['peerstate'])} entries", 'debug')

info = plugin.rpc.getinfo()
config = plugin.rpc.listconfigs()
Expand Down

0 comments on commit 37022fb

Please sign in to comment.