Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove flush_timings_secs setting (#33505)

Ted Johansson9f1986ec6017
diff --git a/app/assets/javascripts/discourse/app/services/screen-track.js b/app/assets/javascripts/discourse/app/services/screen-track.js
index de2da9931e7..7074d36c3b4 100644
--- a/app/assets/javascripts/discourse/app/services/screen-track.js
+++ b/app/assets/javascripts/discourse/app/services/screen-track.js
@@ -338,7 +338,7 @@ export default class ScreenTrack extends Service {
this._lastFlush += diff;
this._lastTick = now;
- const nextFlush = this.siteSettings.flush_timings_secs * 1000;
+ const nextFlush = 60 * 1000;
const rush = [...this._timings.entries()].some(([postNumber, timing]) => {
return (
diff --git a/app/assets/javascripts/discourse/tests/helpers/site-settings.js b/app/assets/javascripts/discourse/tests/helpers/site-settings.js
index 2873a8dc7b9..13afcafb13f 100644
--- a/app/assets/javascripts/discourse/tests/helpers/site-settings.js
+++ b/app/assets/javascripts/discourse/tests/helpers/site-settings.js
@@ -11,7 +11,6 @@ const CLIENT_SETTING_TEST_OVERRIDES = {
enable_github_logins: true,
authorized_extensions: "jpg|jpeg|png|gif|heic|heif|webp|svg|txt|ico|yml",
anon_polling_interval: 30000,
- flush_timings_secs: 5,
};
// Note, CLIENT_SITE_SETTINGS_WITH_DEFAULTS is generated by the site-settings-plugin,
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index c4c1aa6af1a..d6cd3d32e7a 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -2208,7 +2208,6 @@ en:
email_time_window_mins: "Wait (n) minutes before sending any notification emails, to give users a chance to edit and finalize their posts."
personal_email_time_window_seconds: "Wait (n) seconds before sending any personal message notification emails, to give users a chance to edit and finalize their messages."
email_posts_context: "How many prior replies to include as context in notification emails."
- flush_timings_secs: "How frequently we flush timing data to the server, in seconds."
title_max_word_length: "The maximum allowed word length, in characters, in a topic title."
title_min_entropy: "The minimum entropy (unique characters, non-english count for more) required for a topic title."
body_min_entropy: "The minimum entropy (unique characters, non-english count for more) required for a post body."
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 80a06160403..bfbc8b605ce 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -2931,9 +2931,6 @@ developer:
client: true
default: 25000
max: 99000
- flush_timings_secs:
- client: true
- default: 60
active_user_rate_limit_secs: 60
verbose_localization:
default: false
diff --git a/db/post_migrate/20250708031631_remove_flush_timings_secs_setting.rb b/db/post_migrate/20250708031631_remove_flush_timings_secs_setting.rb
new file mode 100644
index 00000000000..5b1e333d5f4
--- /dev/null
+++ b/db/post_migrate/20250708031631_remove_flush_timings_secs_setting.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemoveFlushTimingsSecsSetting < ActiveRecord::Migration[7.2]
+ def up
+ execute <<~SQL
+ DELETE FROM site_settings
+ WHERE name = 'flush_timings_secs';
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end