File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,6 @@ struct Arguments {
35
35
36
36
#[ arg( default_value = "false" , long) ]
37
37
disable_hackactivity_polling : bool ,
38
-
39
- #[ arg( default_value = "false" , long) ]
40
- disable_user_report_count_polling : bool ,
41
38
}
42
39
fn main ( ) {
43
40
pretty_env_logger:: init ( ) ;
@@ -63,12 +60,20 @@ fn main() {
63
60
redis_client : redis,
64
61
} ;
65
62
66
- // No error handling here so we don't check the result
67
- let _ = polls:: reputation:: run_poll ( & config) ;
68
- let _ = polls:: reports:: run_poll ( & config) ;
69
63
70
- polls:: reputation:: start_poll_event_loop ( & config) ;
71
- polls:: reports:: start_poll_event_loop ( & config) ;
64
+ // We don't check the result on the first call
65
+ // since there's no error handling here
66
+
67
+ if !args. disable_reputation_polling {
68
+ let _ = polls:: reputation:: run_poll ( & config) ;
69
+ polls:: reputation:: start_poll_event_loop ( & config) ;
70
+ }
71
+
72
+ if !args. disable_hackactivity_polling {
73
+ let _ = polls:: reports:: run_poll ( & config) ;
74
+ polls:: reports:: start_poll_event_loop ( & config) ;
75
+ }
76
+
72
77
73
78
// keep main thread alive
74
79
loop {
You can’t perform that action at this time.
0 commit comments