From 2b526d85ed594a26a9a53d745e3cd3f1996989a1 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Mon, 12 Dec 2016 06:33:58 +0000 Subject: [PATCH] reduce sandboxing time, set to single threaded as an experiment --- Rakefile | 2 +- puma_config.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index efb44d78..120f015d 100644 --- a/Rakefile +++ b/Rakefile @@ -106,7 +106,7 @@ task :compile_nginx_mapfiles => [:environment] do end 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')", 1.week.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')", 2.days.ago].all.collect {|s| s[:username]}.each {|username| file.write "#{username} 1;\n"} end # Compile letsencrypt ssl keys diff --git a/puma_config.rb b/puma_config.rb index 5fb01d68..b23fd451 100644 --- a/puma_config.rb +++ b/puma_config.rb @@ -16,6 +16,7 @@ def processor_count end end +threads 1, 1 environment 'production' daemonize pidfile '/var/run/neocities/neocities.pid'