Skip to content

Commit 6e648d8

Browse files
author
Jan Kunzmann
committed
check-mysql-replication-status: address PR remarks
1 parent 8793fdc commit 6e648d8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bin/check-mysql-replication-status.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CheckMysqlReplicationStatus < Sensu::Plugin::Check::CLI
4646
description: 'Database port',
4747
default: 3306,
4848
# #YELLOW
49-
proc: lambda { |s| s.to_i } # rubocop:disable Lambda
49+
proc: proc { |s| s.to_i }
5050

5151
option :socket,
5252
short: '-s SOCKET',
@@ -84,33 +84,33 @@ class CheckMysqlReplicationStatus < Sensu::Plugin::Check::CLI
8484
description: 'Warning threshold for replication lag',
8585
default: 900,
8686
# #YELLOW
87-
proc: lambda { |s| s.to_i } # rubocop:disable Lambda
87+
proc: proc { |s| s.to_i }
8888

8989
option :crit,
9090
short: '-c',
9191
long: '--critical=VALUE',
9292
description: 'Critical threshold for replication lag',
9393
default: 1800,
9494
# #YELLOW
95-
proc: lambda { |s| s.to_i } # rubocop:disable Lambda
95+
proc: proc { |s| s.to_i }
9696

9797
option :lag_outlier_retry,
9898
long: '--lag-outlier-retry=VALUE',
9999
description: 'Number of retries when lag outlier is detected (0 = disable)',
100100
default: 0,
101-
proc: lambda { |s| s.to_i } # rubocop:disable Lambda
101+
proc: proc { |s| s.to_i }
102102

103103
option :lag_outlier_threshold,
104104
long: '--lag-outlier-threshold=VALUE',
105105
description: 'Lag threshold to trigger outlier protection',
106106
default: 100000,
107-
proc: lambda { |s| s.to_i } # rubocop:disable Lambda
107+
proc: proc { |s| s.to_i }
108108

109109
option :lag_outlier_sleep,
110110
long: '--lag-outlier-sleep=VALUE',
111111
description: 'Sleep between lag outlier protection retries',
112112
default: 1,
113-
proc: lambda { |s| s.to_i } # rubocop:disable Lambda
113+
proc: proc { |s| s.to_i }
114114

115115

116116
def detect_replication_status?(row)

0 commit comments

Comments
 (0)