diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:10:32 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:10:32 +0000 |
commit | fea454753efc4a673751131960c394254555d34a (patch) | |
tree | 47732a1c331c236f8f082dc4f6f5a6c6d6dab058 /bin/custodian-queue | |
parent | edf0e675123e4869e2739d1bab0ed57b3b9f664c (diff) |
Don't use parenthesis aroudn conditions in an if.
Diffstat (limited to 'bin/custodian-queue')
-rwxr-xr-x | bin/custodian-queue | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/custodian-queue b/bin/custodian-queue index 9dec58a..66bf2ba 100755 --- a/bin/custodian-queue +++ b/bin/custodian-queue @@ -72,7 +72,7 @@ if __FILE__ == $PROGRAM_NAME then opts.each do |opt, arg| case opt when "--monitor" then - if ( arg ) + if arg $MONITOR = arg.to_i else $MONITOR = 5000 @@ -130,14 +130,14 @@ if __FILE__ == $PROGRAM_NAME then # # Alerting on a queue that is too-full? # - if ( !$MONITOR.nil? ) + if !$MONITOR.nil? # # Find the number of jobs # jobs = queue.size? - if ( jobs > $MONITOR ) + if jobs > $MONITOR exit 1 else exit 0 @@ -148,7 +148,7 @@ if __FILE__ == $PROGRAM_NAME then # # Showing stats? # - if ( $STATS ) + if $STATS jobs = queue.size? puts "There are #{jobs || 0} jobs pending." exit( 0 ) @@ -158,7 +158,7 @@ if __FILE__ == $PROGRAM_NAME then # # Are we flushing the queue? # - if ( $FLUSH ) + if $FLUSH queue.flush! end |