Skip to content

Commit

Permalink
lint with perltidy
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed May 23, 2024
1 parent 8563733 commit ca774d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ProductOpener/Redis.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ our $sent_warning_about_missing_redis_url = 0;
# Specific logger to track rate-limiter operations
our $ratelimiter_log = Log::Any->get_logger(category => 'ratelimiter');


=head2 init_redis($is_reconnect=0)
init $redis_client or re-init it if we where disconnected
Expand Down Expand Up @@ -259,7 +258,8 @@ sub increment_rate_limit_requests ($ip, $api_action) {
init_redis();
}
if (defined $redis_client) {
$ratelimiter_log->debug("Incrementing rate-limit requests", {ip => $ip, api_action => $api_action}) if $ratelimiter_log->is_debug();
$ratelimiter_log->debug("Incrementing rate-limit requests", {ip => $ip, api_action => $api_action})
if $ratelimiter_log->is_debug();
my $current_minute = int(time() / 60);
eval {
# Use a MULTI/EXEC block to increment the counter and set the expiration atomically
Expand All @@ -280,7 +280,8 @@ sub increment_rate_limit_requests ($ip, $api_action) {
$redis_client = undef;
}
else {
$ratelimiter_log->debug("Incremented number of requests from Redis rate-limiter", {ip => $ip, api_action => $api_action})
$ratelimiter_log->debug("Incremented number of requests from Redis rate-limiter",
{ip => $ip, api_action => $api_action})
if $ratelimiter_log->is_debug();
}

Expand Down

0 comments on commit ca774d9

Please sign in to comment.