Merge ~pjdc/discourse-charm/+git/discourse-charm:bundle-is-not-asynchronous into discourse-charm:master

Proposed by Paul Collins
Status: Merged
Approved by: Barry Price
Approved revision: d30fca7f7142a4eb36c005ed78937b2c837dfccc
Merged at revision: 4a801232e772ddb7973cee5c5f1bfac73e9eac57
Proposed branch: ~pjdc/discourse-charm/+git/discourse-charm:bundle-is-not-asynchronous
Merge into: discourse-charm:master
Diff against target: 24 lines (+0/-13)
1 file modified
reactive/discourse.py (+0/-13)
Reviewer Review Type Date Requested Status
Barry Price Approve
Review via email: mp+362153@code.launchpad.net

Commit message

prepare_codebase: bundle() is not asynchronous, so there's no rake to wait for

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Barry Price (barryprice) wrote :

+1

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 4a801232e772ddb7973cee5c5f1bfac73e9eac57

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/discourse.py b/reactive/discourse.py
2index 3e27cda..8fbd9c7 100644
3--- a/reactive/discourse.py
4+++ b/reactive/discourse.py
5@@ -141,19 +141,6 @@ def prepare_codebase(pgsql):
6 bundle('exec rake db:migrate RAILS_ENV=production')
7 # Compile CSS/JS? I'm not sure what this does but it's necessary.
8 bundle('exec rake assets:precompile RAILS_ENV=production')
9- # The asset compilation takes a while and we need to do some things once
10- # it finishes, so sit and spin while it runs.
11- timeout = time.time() + 60 * 5
12- rake_done = False
13- while time.time() < timeout and rake_done is False:
14- # This seems weird but we want to assume the rake is done, then if we
15- # find it in the process list, set rake_done back to False, I can't
16- # think of a good way to check this otherwise.
17- rake_done = True
18- for p in psutil.process_iter():
19- if 'rake' in p.name() or 'rake' in ' '.join(p.cmdline()):
20- rake_done = False
21- time.sleep(5)
22 if hookenv.config('plugins'):
23 fetch_plugins()
24 # The ruby layer doesn't have a concept of ownership, so after the rakes

Subscribers

People subscribed via source and target branches