mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
bench improvements
This commit is contained in:
parent
74c1555885
commit
1c3fc39525
2 changed files with 46 additions and 15 deletions
|
@ -56,6 +56,8 @@ end
|
|||
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
||||
|
||||
SiteSetting.queue_jobs = false
|
||||
|
||||
unless Rails.env == "profile"
|
||||
puts "This script should only be used in the profile environment"
|
||||
exit
|
||||
|
@ -104,3 +106,8 @@ puts "creating 2000 replies"
|
|||
putc "."
|
||||
PostCreator.create(users.sample, raw: sentence, topic_id: topic_ids.sample, skip_validations: true)
|
||||
end
|
||||
|
||||
# no sidekiq so update some stuff
|
||||
Category.update_stats
|
||||
Jobs::PeriodicalUpdates.new.execute(nil)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue