remove sandbox for banned/deleted sites

This commit is contained in:
Kyle Drake 2017-05-24 12:06:45 -07:00
parent f73b6e5a75
commit e6deaa05b9

View file

@ -112,7 +112,7 @@ task :compile_nginx_mapfiles => [:environment] do
end end
File.open('./files/maps/sandboxed.txt', 'w') do |file| File.open('./files/maps/sandboxed.txt', 'w') do |file|
usernames = DB["select username from sites where created_at > ? and parent_site_id is null and (plan_type is null or plan_type='free')", 2.days.ago].all.collect {|s| s[:username]}.each {|username| file.write "#{username} 1;\n"} usernames = DB["select username from sites where created_at > ? and parent_site_id is null and (plan_type is null or plan_type='free') and is_banned != 't' and is_deleted != 't'", 2.days.ago].all.collect {|s| s[:username]}.each {|username| file.write "#{username} 1;\n"}
end end
# Compile letsencrypt ssl keys # Compile letsencrypt ssl keys