From 4b449241fb09860f3ed60c08e174232c76245d12 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 26 Jun 2015 14:15:52 +1000 Subject: [PATCH] correct formatting --- app/jobs/scheduled/daily_performance_report.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/jobs/scheduled/daily_performance_report.rb b/app/jobs/scheduled/daily_performance_report.rb index 4ddfd9b0eba..c568941716b 100644 --- a/app/jobs/scheduled/daily_performance_report.rb +++ b/app/jobs/scheduled/daily_performance_report.rb @@ -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,