ماذا يحدث بالضبط عند تشغيل الإغلاق التلقائي؟

  • By default, the auto-close setting on a category only applies to newly created topics.
  • Existing topics are not auto-closed as soon as you save the setting. They will remain open unless you explicitly apply the auto-close to them.
  • There is a dedicated script (rake topics:apply_autoclose) that can be run via the server console to apply the auto-close timer to existing topics. This script silently closes qualifying topics (those old enough, based on your setting), minimizing notifications.
  • Applying the setting to all old topics at once using the script is a background operation. If you have a very large community and many old topics, it may take some time, but it runs server-side. Performance impact varies depending on hosting and topic count, but the rake task is designed for bulk actions and should not severely affect healthy, well-provisioned Discourse sites.
  • Discussion on the same is here:
  • Changing the auto-close time does NOT reopen topics that were already closed (i.e., closure is not reversed).
  • There is no built-in user interface option to bulk re-open closed topics.
  • However, you can use a script or a Rails console command to reopen topics in bulk.
Topic.where(closed: true).where("created_at < 'your_date'").find_each do |topic|
  topic.update_status('closed', false, Discourse.system_user)
end
3 إعجابات