Skip to content

Commit

Permalink
Merge pull request #38441 from code-dot-org/increase-account-purge-limit
Browse files Browse the repository at this point in the history
Increased the safety limit of the deleted account purger
  • Loading branch information
jmkulwik committed Jan 12, 2021
2 parents 736dcef + 5a93d3b commit 90672f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dashboard/lib/expired_deleted_account_purger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def initialize(options = {})
# Do nothing if more than this number of accounts would be purged in total.
# We may need to adjust this over time as activity increases on our site.
# This is a loose constraint because cascading student deletes make this a very spiky metric.
# 4000 is ~0.01% of our user rows.
# We expect this to stay below 1500 during September 2018.
@max_accounts_to_purge = options[:max_accounts_to_purge] || 4000
# 8000 is ~0.01% of our user rows in 2021. We expect this to stay below 2000 during regular
# months and 5000 during the HOC week purge (1st week of Jan).
@max_accounts_to_purge = options[:max_accounts_to_purge] || 8000
raise ArgumentError.new('max_accounts_to_purge must be Integer') unless @max_accounts_to_purge.is_a? Integer

reset
Expand Down
2 changes: 1 addition & 1 deletion dashboard/test/lib/expired_deleted_account_purger_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def teardown
assert_equal 60.days.ago, edap.deleted_after
assert_equal 28.days.ago, edap.deleted_before
assert_equal 200, edap.max_teachers_to_purge
assert_equal 4000, edap.max_accounts_to_purge
assert_equal 8000, edap.max_accounts_to_purge
end

test 'raises ArgumentError unless dry_run is boolean' do
Expand Down

0 comments on commit 90672f4

Please sign in to comment.