mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: official benchmark crashing while populating db
This commit is contained in:
parent
1a775aa784
commit
34180eba93
2 changed files with 8 additions and 2 deletions
|
@ -43,6 +43,11 @@ Discourse::Application.configure do
|
||||||
# allows users to use mini profiler
|
# allows users to use mini profiler
|
||||||
config.load_mini_profiler = false
|
config.load_mini_profiler = false
|
||||||
|
|
||||||
|
# we don't need full logster support, but need to keep it working
|
||||||
|
config.after_initialize do
|
||||||
|
Logster.logger = Rails.logger
|
||||||
|
end
|
||||||
|
|
||||||
# for profiling with perftools
|
# for profiling with perftools
|
||||||
# config.middleware.use ::Rack::PerftoolsProfiler, default_printer: 'gif'
|
# config.middleware.use ::Rack::PerftoolsProfiler, default_printer: 'gif'
|
||||||
end
|
end
|
||||||
|
|
|
@ -95,9 +95,10 @@ puts
|
||||||
puts "Creating 100 topics"
|
puts "Creating 100 topics"
|
||||||
|
|
||||||
topic_ids = 100.times.map do
|
topic_ids = 100.times.map do
|
||||||
topic = PostCreator.create(users.sample, raw: sentence, title: sentence[0..50].strip, category: categories.sample.name, skip_validations: true)
|
post = PostCreator.create(users.sample, raw: sentence, title: sentence[0..50].strip, category: categories.sample.name, skip_validations: true)
|
||||||
|
|
||||||
putc "."
|
putc "."
|
||||||
topic.id
|
post.topic_id
|
||||||
end
|
end
|
||||||
|
|
||||||
puts
|
puts
|
||||||
|
|
Loading…
Reference in a new issue