@@ -32,22 +32,39 @@ def metrics():
32
32
pass
33
33
34
34
35
+ @metrics .command (help = "List of all bounties and metrics from local db (fast method)" )
36
+ @click .option ('--force' , '-f' , is_flag = True )
37
+ @login_required
38
+ def all (force ):
39
+ if force :
40
+ print ('Please wait - collecting metrics from blockchain...' )
41
+ bounty_data = get ('all-bounties' )
42
+ if not bounty_data .get ('bounties' , {'force' : force }):
43
+ print ('No bounties found' )
44
+ return
45
+ print_metrics (bounty_data )
46
+
47
+
35
48
@metrics .command (help = "List of bounties and metrics for the first year" )
49
+ @click .option ('--force' , '-f' , is_flag = True )
36
50
@login_required
37
- def first ():
38
- print ('Please wait - collecting metrics from blockchain...' )
51
+ def first (force ):
52
+ if force :
53
+ print ('Please wait - collecting metrics from blockchain...' )
39
54
bounty_data = get ('first-bounties' )
40
- if not bounty_data .get ('bounties' ):
55
+ if not bounty_data .get ('bounties' , { 'force' : force } ):
41
56
print ('No bounties found' )
42
57
return
43
58
print_metrics (bounty_data )
44
59
45
60
46
61
@metrics .command (help = "List of bounties and metrics for the last year" )
62
+ @click .option ('--force' , '-f' , is_flag = True )
47
63
@login_required
48
- def last ():
49
- print ('Please wait - collecting metrics from blockchain...' )
50
- bounty_data = get ('last-bounties' )
64
+ def last (force ):
65
+ if force :
66
+ print ('Please wait - collecting metrics from blockchain...' )
67
+ bounty_data = get ('last-bounties' , {'force' : force })
51
68
if not bounty_data .get ('bounties' ):
52
69
print ('No bounties found' )
53
70
return
0 commit comments