You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
597 B

6 months ago
namespace :cartodb do
namespace :user_overquota do
# e.g. bundle exec rake cartodb:user_overquota:calculate
# bundle exec rake cartodb:user_overquota:calculate[0.20]
desc 'Calculate and store the daily users with overquota greater than some delta'
task :calculate, [:delta] => :environment do |_task, args|
args.with_defaults(delta: 0.20)
delta = args[:delta].to_f
puts 'Executing overquota calculation'
Carto::OverquotaUsersService.new.store_overquota_users(delta)
puts "Ended getting the overquota users for delta #{delta}"
end
end
end