Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
db41f9ff
Commit
db41f9ff
authored
May 22, 2014
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #106 from ADubus/fix-rakefile-tags
Fix task seed in Rakefile
parents
d5523cc7
a1a40d4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
11 deletions
+1
-11
AUTHORS
+1
-0
Rakefile
+0
-11
No files found.
AUTHORS
View file @
db41f9ff
...
...
@@ -17,3 +17,4 @@ Jay Zoldak <jzoldak@edx.org>
Jim Abramson <jsa@edx.org>
Greg Price <gprice@edx.org>
Sarina Canelake <sarina@edx.org>
Alexandre Dubus <alexandre.dubus@inria.fr>
Rakefile
View file @
db41f9ff
...
...
@@ -53,7 +53,6 @@ namespace :db do
task
:clean
=>
:environment
do
Comment
.
delete_all
CommentThread
.
delete_all
CommentThread
.
recalculate_all_context_tag_weights!
User
.
delete_all
Notification
.
delete_all
Subscription
.
delete_all
...
...
@@ -68,14 +67,6 @@ namespace :db do
def
generate_comments_for
(
commentable_id
,
num_threads
=
THREADS_PER_COMMENTABLE
,
num_top_comments
=
TOP_COMMENTS_PER_THREAD
,
num_subcomments
=
ADDITIONAL_COMMENTS_PER_THREAD
)
level_limit
=
CommentService
.
config
[
"level_limit"
]
tag_seeds
=
[
"artificial-intelligence"
,
"random rant"
,
"c++"
,
"c#"
,
"java-sucks"
,
"2012"
,
]
users
=
User
.
all
.
to_a
...
...
@@ -90,7 +81,6 @@ namespace :db do
comment_thread
=
CommentThread
.
new
(
commentable_id:
commentable_id
,
body:
Faker
::
Lorem
.
paragraphs
.
join
(
"
\n\n
"
),
title:
Faker
::
Lorem
.
sentence
(
6
))
comment_thread
.
author
=
users
.
sample
comment_thread
.
tags
=
tag_seeds
.
sort_by
{
rand
}[
0
..
2
].
join
(
","
)
comment_thread
.
course_id
=
COURSE_ID
comment_thread
.
save!
threads
<<
comment_thread
...
...
@@ -192,7 +182,6 @@ namespace :db do
Comment
.
delete_all
CommentThread
.
delete_all
CommentThread
.
recalculate_all_context_tag_weights!
User
.
delete_all
Notification
.
delete_all
Subscription
.
delete_all
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment