mirror of
https://github.com/lightningd/plugins.git
synced 2026-08-15 12:50:41 +02:00
probe: Add probe-stats method to show some general statistics
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
e4f8d2d0b8
commit
8b24e19bbb
1 changed files with 9 additions and 0 deletions
|
|
@ -121,6 +121,15 @@ def probe(request, plugin, node_id=None, **kwargs):
|
|||
})
|
||||
|
||||
|
||||
@plugin.method('probe-stats')
|
||||
def stats(plugin):
|
||||
return {
|
||||
'pending_probes': len(plugin.pending_probes),
|
||||
'exclusions': len(exclusions),
|
||||
'temporary_exclusions': len(temporary_exclusions),
|
||||
}
|
||||
|
||||
|
||||
def complete_probe(plugin, request, probe_id, payment_hash):
|
||||
s = plugin.Session()
|
||||
p = s.query(Probe).get(probe_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue