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