add script for vacuuming
This commit is contained in:
@@ -58,6 +58,9 @@ module DelayedJobsHelper
|
||||
when "Post.delete_files"
|
||||
"<strong>delete old files</strong>"
|
||||
|
||||
when "BulkRevert#process"
|
||||
"<strong>bulk revert</strong>"
|
||||
|
||||
else
|
||||
h(job.name)
|
||||
end
|
||||
@@ -119,6 +122,9 @@ module DelayedJobsHelper
|
||||
when "Post.delete_files"
|
||||
%{<a href="/posts/#{job.payload_object.args.first}">post ##{job.payload_object.args.first}</a>}
|
||||
|
||||
when "BulkRevert#process"
|
||||
h(job.payload_object.args.join(" "))
|
||||
|
||||
else
|
||||
h(job.handler)
|
||||
end
|
||||
|
||||
10
script/donmai/vacuum.sh
Executable file
10
script/donmai/vacuum.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
psql -h dbserver <<EOF
|
||||
set statement_timeout = 0;
|
||||
vacuum analyze posts;
|
||||
vacuum analyze tags;
|
||||
vacuum analyze users;
|
||||
vacuum analyze favorites;
|
||||
vacuum analyze comments;
|
||||
EOF
|
||||
Reference in New Issue
Block a user