Merge pull request #4687 from tgxworld/remove_autovacuum_from_discourse
Remove database vacuum task from Discourse.
This commit is contained in:
commit
c33d08e296
|
@ -1224,7 +1224,6 @@ de:
|
|||
show_create_topics_notice: "Administratoren eine Warnmeldung anzeigen, wenn im Forum weniger als 5 öffentlich sichtbare Themen existieren."
|
||||
delete_drafts_older_than_n_days: Lösche Entwürfe, die mehr als (n) Tage alt sind.
|
||||
bootstrap_mode_min_users: "Erforderliche Benutzeranzahl, um den Starthilfe-Modus zu deaktivieren (0 = ausgeschaltet)"
|
||||
vacuum_db_days: "Führe VACUUM ANALYZE aus, um Datenbankspeicher nach Migrationen zurückzuerhalten (0 um zu deaktivieren)"
|
||||
prevent_anons_from_downloading_files: "Nichtangemeldeten Benutzern das Herunterladen von Anhängen verbieten. WARNUNG: dies verhindert auch das Herunterladen jeglicher Ressourcen für Website-Anpassungen, die als Anhänge gespeichert wurden."
|
||||
slug_generation_method: "Gib eine Methode an, wie Kürzel in URLs generiert werden sollen. 'encoded' verwendet einen Prozent-Encodierten String, bei 'none' wird kein Kürzel verwendet."
|
||||
enable_emoji: "Aktiviere emoji"
|
||||
|
|
|
@ -1424,8 +1424,6 @@ en:
|
|||
|
||||
bootstrap_mode_min_users: "Minimum number of users required to disable bootstrap mode (set to 0 to disable)"
|
||||
|
||||
vacuum_db_days: "Run VACUUM ANALYZE to reclaim DB space after migrations (set to 0 to disable)"
|
||||
|
||||
prevent_anons_from_downloading_files: "Prevent anonymous users from downloading attachments. WARNING: this will prevent any non-image site assets posted as attachments from working."
|
||||
|
||||
slug_generation_method: "Choose a slug generation method. 'encoded' will generate percent encoding string. 'none' will disable slug at all."
|
||||
|
|
|
@ -1227,7 +1227,6 @@ es:
|
|||
show_create_topics_notice: "Si el sitio tiene menos de 5 temas abiertos al público, mostrar un aviso pidiendo a los administradores crear más temas."
|
||||
delete_drafts_older_than_n_days: Eliminar borradores de más de (n) días de antigüedad.
|
||||
bootstrap_mode_min_users: "Mínimo número de usuarios requerido para desactivar el modo bootstrap (pon 0 para desactivar esta opción)"
|
||||
vacuum_db_days: "Ejecutar VACUUM ANALYZE para reclamar espacio en la base de datos después de las migraciones. (Poner en 0 para inhabilitar)"
|
||||
prevent_anons_from_downloading_files: "Impedir que los usuarios anónimos descarguen archivos. ADVERTENCIA: Esto impedirá que funcione cualquier recurso del sitio publicado como adjunto."
|
||||
slug_generation_method: "Elegir un método de generación de slug. 'encoded' generará cadenas con código porciento. 'none' hara que no se genere slug."
|
||||
enable_emoji: "Habilitar emoji"
|
||||
|
|
|
@ -1223,7 +1223,6 @@ fi:
|
|||
show_create_topics_notice: "Jos palstalla on vähemmän kuin 5 julkista ketjua, huomauta ylläpitäjiä ketjujen luonnista."
|
||||
delete_drafts_older_than_n_days: Poista yli (n) päivää vanhat luonnokset.
|
||||
bootstrap_mode_min_users: "Vähimmäismäärä käyttäjiä, joka vaaditaan aloitustilan poistamiseen (aseta 0 poistaaksesi käytöstä)"
|
||||
vacuum_db_days: "Aja VACUUM ANALYZE vapauttaaksesi tietokannan viemää tilaa migraatioiden jälkeen (aseta 0 poistaaksesi käytöstä)"
|
||||
prevent_anons_from_downloading_files: "Estä kirjautumattomia käyttäjiä lataamasta liitetiedostoja. VAROITUS: tämä estää viestin liitettyjen muiden tiedostojen, kuin kuvien käyttämisen sivustolla."
|
||||
slug_generation_method: "Valitse polkulyhenteen luomisen metodi. 'encoded' käyttää prosenttikoodausta, 'none' poistaa polkulyhenteet käytöstä."
|
||||
enable_emoji: "Ota emoji käyttöön"
|
||||
|
|
|
@ -1225,7 +1225,6 @@ fr:
|
|||
show_create_topics_notice: "Si le site contient moins de 5 sujets publics, afficher un message pour demander aux administrateurs de créer d'autres sujets."
|
||||
delete_drafts_older_than_n_days: Supprimer les brouillons plus vieux que (n) jours.
|
||||
bootstrap_mode_min_users: "Nombre minimum d'utilisateurs nécessaire pour désactiver le mode de démarrage (mettre à 0 pour désactiver)"
|
||||
vacuum_db_days: "Exécuter VACUUM ANALYZE pour récupérer de l'espace dans la base de données après une migration (mettre à 0 pour désactiver)"
|
||||
prevent_anons_from_downloading_files: "Refuser le téléchargement de pièces jointes aux visiteurs. ATTENTION : cela empêchera de fonctionner les ressources envoyées en pièce jointe qui ne sont pas des images."
|
||||
slug_generation_method: "Choisissez une méthode de génération d'identifiant. \"encodé\" générera des chaines de caractères encodées avec des pourcentages. \"aucune\" désactivera complètement les identifiants."
|
||||
enable_emoji: "Activer les emojis"
|
||||
|
|
|
@ -1224,7 +1224,6 @@ he:
|
|||
show_create_topics_notice: "אם לאתר פחות מ-5 נושאים פומביים, הציגו מודעה המבקשת מן המנהלים ליצור עוד נושאים."
|
||||
delete_drafts_older_than_n_days: מחקו טיוטות בנות יותר מ (n) ימים.
|
||||
bootstrap_mode_min_users: "מספר משתמשים מינימלי שנדרש כדי לנטרל מצב איתחול (קבעו ל 0 כדי לנטרל)"
|
||||
vacuum_db_days: "הריצו VACUUM ANALYZE כדי להשיב מקום בבסיס הנתונים לאחר המרות (קבעו ל 0 כדי לנטרל)"
|
||||
prevent_anons_from_downloading_files: "מונע ממשתמשים אנונימיים להוריד צרופות (attachments). אזהרה: דבר זה ימנע מכל משאב שאינו תמונה ופורסם כצרופה לעבוד."
|
||||
slug_generation_method: "בחרו צורת ייצור slug. צורה של 'encoded' תגרום למחרוזות עם קידוד אחוזים. 'none' ינטרל slug לחלוטין."
|
||||
enable_emoji: "אפשרו emoji"
|
||||
|
|
|
@ -1192,7 +1192,6 @@ pt:
|
|||
show_create_topics_notice: "Se o sítio tem menos de 5 tópicos públicos, mostrar um aviso pedindo aos administradores a criação de mais tópicos."
|
||||
delete_drafts_older_than_n_days: Eliminar rascunhos mais antigos que (n) days.
|
||||
bootstrap_mode_min_users: "Número mínimo de utilizadores necessários para desactivar o modo de inicialização (coloque 0 para desactivar)"
|
||||
vacuum_db_days: "Executar VACUUM ANALYZE para reclamar espaço na BD após as migrações (configurar a 0 para desativar)"
|
||||
prevent_anons_from_downloading_files: "Previna que utilizadores anónimos descarreguem anexos. AVISO: isto irá fazer com que quaisquer atributos (que não sejam imagens) publicados como anexos não funcionem."
|
||||
slug_generation_method: "Escolha um método de geração slug. 'encoded' irá gerar sequências de caracteres com código percentual. 'none' irá desativar slug por completo."
|
||||
enable_emoji: "Ativar emoji"
|
||||
|
|
|
@ -1239,7 +1239,6 @@ ro:
|
|||
show_create_topics_notice: "Dacă site-ul are mai puțin de 5 subiecte publice, afișează o notificare prin care se cere adminilor să creeze subiecte."
|
||||
delete_drafts_older_than_n_days: șterge drafturile mai vechi de (n) zile.
|
||||
bootstrap_mode_min_users: "Numărul minim de utilizatori necesar pentru dezactivarea modului bootstrap (0 pentru dezactivare)"
|
||||
vacuum_db_days: "Rulează VACUUM ANALYZE pentru a recupera spațiul din baza de date după o migrare (0 pentru dezactivare)"
|
||||
prevent_anons_from_downloading_files: "Blochează utilizatorii anonimi de la descărcarea de atașamente. ATENȚIE: aceasta va face ca toate resursele site-ului care sunt postate ca atașamente să nu mai meargă."
|
||||
slug_generation_method: "Alege o metodă de generare de identificator. 'encodat' va genera șir de caractere encodate cu procentaje. 'nimic' va dezactiva complet identificatorii."
|
||||
enable_emoji: "Activează emoji"
|
||||
|
|
|
@ -1063,7 +1063,6 @@ sk:
|
|||
notify_about_flags_after: "Ak existujú príznaky ktoré neboli vyriešené po uvedenom počte hodín, pošli email na contact_email. Pre vypnutie nastavte 0."
|
||||
show_create_topics_notice: "Zobraz výzvu žiadajúcu administrátorov o vytvorenie nejakých tém, ak majú stránky menej ako 5 verejných tém."
|
||||
delete_drafts_older_than_n_days: Vymazať návrhy staršie ako (n) dní.
|
||||
vacuum_db_days: "Spustiť VACUUM ANALYZE na získanie DB miesto po migráciách (pre vypnutie nastavte na 0)"
|
||||
prevent_anons_from_downloading_files: "Zabrániť anonymným používateľom sťahovať prílohy. VAROVANIE: toto nastavenie zneprístupní akékoľvek neobrázkové súbory na stánkach uložené ako prílohy."
|
||||
slug_generation_method: "Vybrať metódu generovania koncovej časti adresy. 'encoded' vygeneruje percentami zakódovaní reťazec. 'none' vypne koncovú časť adresy úplne."
|
||||
enable_emoji: "Zapnúť emoji"
|
||||
|
|
|
@ -1123,7 +1123,6 @@ sv:
|
|||
show_create_topics_notice: "Visa en notis som ber administratörerna att skapa några ämnen om webbplatsen har färre än 5 publika ämnen."
|
||||
delete_drafts_older_than_n_days: Ta bort utkast som är äldre än (n) dagar.
|
||||
bootstrap_mode_min_users: "Minsta antal användare som krävs för att inaktivera bootstrap-läget (ange 0 för att inaktivera)"
|
||||
vacuum_db_days: "Kör VACUUM ANALYZE för att återvinna DB-utrymme efter migrering (ange 0 för att inaktivera)"
|
||||
prevent_anons_from_downloading_files: "Förhindra anonyma användare från att ladda ned bilagor. VARNING: det kommer att förhindra alla webbplatsens tillgångar som inte är bilder och som lagts upp som bilagor från att fungera."
|
||||
slug_generation_method: "Välj en genereringsmetod för etiketter. Ange 'none' för att inaktivera generering av etiketter. "
|
||||
enable_emoji: "Aktivera emoji"
|
||||
|
|
|
@ -1042,7 +1042,6 @@ tr_TR:
|
|||
show_create_topics_notice: "Eğer sitede herkese açık konu sayısı 5'den az ise, yöneticiden yeni konular oluşturmasını isteyen bir uyarı iletisi göster. "
|
||||
delete_drafts_older_than_n_days: (n) günden eski taslakları sil.
|
||||
bootstrap_mode_min_users: "bootstrap modunun edilgen olması için gereken en az kullanıcı sayısı (edilgen bırakmak için 0 yapın)"
|
||||
vacuum_db_days: "Geçiş sonrası DB alanı geri kazanmak için TAM VAKUM ANALİZİ'ni çalıştırın (devre dışı bırakmak için 0 girin)"
|
||||
prevent_anons_from_downloading_files: "Anonim kullanıcıların eklenti indirebilmesini önle. DİKKAT: Bu ayar, eklenti olarak gönderilen resim-dışı site içeriklerinin de çalışmasını engelleyebilir."
|
||||
slug_generation_method: "Slug üretim yöntemi seçin. 'kodlanmış' seçeneği yüzde kodlamalı metin oluşturur. 'hiçbiri' seçeneği slug'ı devre dışı bırakır."
|
||||
enable_emoji: "Emojiyi etkinleştir"
|
||||
|
|
|
@ -1009,7 +1009,6 @@ vi:
|
|||
notify_about_flags_after: "Nếu có các đánh dấu chưa được xử lý sau số giờ được thiết lập ở đây, gửi email đến contact_email. Đặt là 0 để vô hiệu hóa."
|
||||
show_create_topics_notice: "Nếu trang có ít hơn 5 chủ đề công khai, hiển thị một thông báo yêu cầu quản trị tạo thêm các chủ đề mới"
|
||||
delete_drafts_older_than_n_days: Xóa các bản nháp cũ hơn (n) ngày.
|
||||
vacuum_db_days: "Chạy VACUUM ANALYZE để lấy lại khoảng trống DB sau khi migration (đặt là 0 để tắt)"
|
||||
prevent_anons_from_downloading_files: "Cấm khách truy cập tải các tập tin đính kèm. CẢNH BÁO: việc này sẽ chặn những hình ảnh không thuộc giao diện trang hoạt động"
|
||||
slug_generation_method: "Chọn phương thức tạo slug. 'encoded' sẽ tạo ra phần trăm chuỗi mã hóa. 'none' sẽ tắt slug."
|
||||
enable_emoji: "Kích hoạt emoji"
|
||||
|
|
|
@ -1187,7 +1187,6 @@ zh_CN:
|
|||
show_create_topics_notice: "如果站点只有少于 5 篇的公开帖子时,显示一条请管理员创建帖子的提示。"
|
||||
delete_drafts_older_than_n_days: 删除超过 n 天得草稿。
|
||||
bootstrap_mode_min_users: "禁用摘要模式的用户数下限(0 为禁用)。"
|
||||
vacuum_db_days: "在数据库迁移后使用完整扫描回收数据库空间(设置 0 为禁用)"
|
||||
prevent_anons_from_downloading_files: "禁止匿名用户下载附件。警告:这将禁止他们访问任何发表在帖子中的非图片资源。"
|
||||
slug_generation_method: "选择一个链接生成方式。“encoded”将生成以百分号编码的链接。“none”将禁用自定义链接,只生成默认链接。"
|
||||
enable_emoji: "启用绘文字(emoji)"
|
||||
|
|
|
@ -1187,7 +1187,6 @@ zh_TW:
|
|||
show_create_topics_notice: "如果網站的公開討論話題少於 5 個,顯示通知要求管理員建立一些討論話題。"
|
||||
delete_drafts_older_than_n_days: 刪除超過 n 天得草稿。
|
||||
bootstrap_mode_min_users: "禁用摘要模式的用戶數下限(0 為禁用)。"
|
||||
vacuum_db_days: "在資料庫遷移後使用完整掃瞄回收資料庫空間(設置 0 為禁用)"
|
||||
prevent_anons_from_downloading_files: "禁止匿名用戶下載附件。警告:這將禁止他們訪問任何發表在帖子中的非圖片資源。"
|
||||
slug_generation_method: "選擇一個連結生成方式。“encoded”將生成以百分號編碼的連結。“none”將禁用自定義連結,只生成預設連結。"
|
||||
enable_emoji: "啟用表情符號"
|
||||
|
|
|
@ -1261,11 +1261,6 @@ uncategorized:
|
|||
|
||||
disable_edit_notifications: false
|
||||
|
||||
vacuum_db_days: 90
|
||||
last_vacuum:
|
||||
default: 0
|
||||
hidden: true
|
||||
|
||||
delete_drafts_older_than_n_days:
|
||||
default: 180
|
||||
min: 0
|
||||
|
|
|
@ -6,24 +6,6 @@ end
|
|||
# we need to run seed_fu every time we run rake db:migrate
|
||||
task 'db:migrate' => ['environment', 'set_locale'] do
|
||||
SeedFu.seed
|
||||
|
||||
SiteSetting.last_vacuum = Time.now.to_i if SiteSetting.last_vacuum == 0
|
||||
|
||||
if SiteSetting.vacuum_db_days > 0 &&
|
||||
SiteSetting.last_vacuum < (Time.now.to_i - SiteSetting.vacuum_db_days.days.to_i)
|
||||
puts "Running VACUUM ANALYZE to reclaim DB space, this may take a while"
|
||||
puts "Set to run every #{SiteSetting.vacuum_db_days} days (search for vacuum in site settings)"
|
||||
puts "#{Time.now} starting..."
|
||||
begin
|
||||
|
||||
Topic.exec_sql("VACUUM ANALYZE")
|
||||
rescue => e
|
||||
puts "VACUUM failed, skipping"
|
||||
puts e.to_s
|
||||
end
|
||||
SiteSetting.last_vacuum = Time.now.to_i
|
||||
puts "#{Time.now} VACUUM done"
|
||||
end
|
||||
end
|
||||
|
||||
task 'test:prepare' => 'environment' do
|
||||
|
|
Loading…
Reference in New Issue