mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 19:10:56 +08:00
user simulator was bust
This commit is contained in:
parent
dfa5a8a83f
commit
b6028c39d7
@ -50,11 +50,11 @@ puts "Simulating activity for user id #{user.id}: #{user.name}"
|
|||||||
while true
|
while true
|
||||||
puts "Creating a random topic"
|
puts "Creating a random topic"
|
||||||
|
|
||||||
category = Category.where(secure: false).order('random()').first
|
category = Category.where(read_restricted: false).order('random()').first
|
||||||
PostCreator.create(user, raw: sentence, title: sentence[0..50].strip, category: category.name)
|
PostCreator.create(user, raw: sentence, title: sentence[0..50].strip, category: category.name)
|
||||||
|
|
||||||
puts "creating random reply"
|
puts "creating random reply"
|
||||||
PostCreator.create(user, raw: sentence, topic_id: last_topics.sample)
|
PostCreator.create(user, raw: sentence, topic_id: last_topics.sample)
|
||||||
|
|
||||||
sleep 10
|
sleep 2
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user