Skip to content

Commit

Permalink
Fix exception with rake task
Browse files Browse the repository at this point in the history
Update options passed into `InfoRequest.reject_incoming_at_mta` to
ensure they are cast to integer correct as the method expects. Tests
only pass in integers so we should here too.

Fixes #8546
  • Loading branch information
gbp committed Jan 20, 2025
1 parent d57b209 commit fa2d23a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tasks/config_files.rake
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ namespace :config_files do
check_for_env_vars(%w[REJECTED_THRESHOLD AGE_IN_MONTHS], example)
dryrun = ENV['DRYRUN'] != '0'
STDERR.puts "Only a dry run; info_requests will not be updated" if dryrun
options = { rejection_threshold: ENV['REJECTED_THRESHOLD'],
age_in_months: ENV['AGE_IN_MONTHS'],
dryrun: dryrun }
options = { rejection_threshold: ENV['REJECTED_THRESHOLD'].to_i,
age_in_months: ENV['AGE_IN_MONTHS'].to_i,
dryrun: dryrun }

updated_count = InfoRequest.reject_incoming_at_mta(options) do |ids|
puts "Info Request\tRejected incoming count\tLast updated"
Expand Down

0 comments on commit fa2d23a

Please sign in to comment.