Skip to content

Commit

Permalink
FIX: use different method name for topic rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitjalan committed Sep 29, 2017
1 parent 2c2fe7e commit df09599
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tasks/topics.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def print_status(label, current, max)
def print_status_with_label(label, current, max)
print "\r%s%9d / %d (%5.1f%%)" % [label, current, max, ((current.to_f / max.to_f) * 100).round(1)]
end

Expand All @@ -21,7 +21,7 @@ def close_old_topics(category)

topics.find_each do |topic|
topic.update_status("closed", true, Discourse.system_user)
print_status(" closing old topics: ", topics_closed += 1, total)
print_status_with_label(" closing old topics: ", topics_closed += 1, total)
end
end

Expand All @@ -47,7 +47,7 @@ def apply_auto_close(category)

topics.find_each do |topic|
topic.inherit_auto_close_from_category
print_status(" applying auto-close to topics: ", topics_closed += 1, total)
print_status_with_label(" applying auto-close to topics: ", topics_closed += 1, total)
end
end

Expand Down

3 comments on commit df09599

@gschlager
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! I didn't know about that behavior of rake. Thanks for fixing it @techapj .

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/rebake-all-posts/69340/11

@kevinjalbert
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad my blog post helped out! It is awesome to see it referenced here 👍

Please sign in to comment.