correct formatting

This commit is contained in:
Sam 2015-06-26 14:15:52 +10:00
parent 5373413102
commit 4b449241fb
1 changed files with 10 additions and 4 deletions

View File

@ -6,10 +6,16 @@ module Jobs
def execute(args)
if SiteSetting.daily_performance_report
result = `ruby #{Rails.root}/script/nginx_analyze.rb --limit 1440`
if result.strip.empty?
result = "Report is only available in latest image, please run: \n\n cd /var/discourse && ./launcher rebuild app"
end
report_data = "```text\n#{result}\n```"
report_data =
if result.strip.empty?
"Report is only available in latest image, please run:
```text
cd /var/discourse
./launcher rebuild app
```"
else
"```text\n#{result}\n```"
end
PostCreator.create(Discourse.system_user,
topic_id: performance_topic_id,