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
diff --git a/reactive/discourse.py b/reactive/discourse.py
index 3e27cda..8fbd9c7 100644
--- a/reactive/discourse.py
+++ b/reactive/discourse.py
@@ -141,19 +141,6 @@ def prepare_codebase(pgsql):
141 bundle('exec rake db:migrate RAILS_ENV=production')141 bundle('exec rake db:migrate RAILS_ENV=production')
142 # Compile CSS/JS? I'm not sure what this does but it's necessary.142 # Compile CSS/JS? I'm not sure what this does but it's necessary.
143 bundle('exec rake assets:precompile RAILS_ENV=production')143 bundle('exec rake assets:precompile RAILS_ENV=production')
144 # The asset compilation takes a while and we need to do some things once
145 # it finishes, so sit and spin while it runs.
146 timeout = time.time() + 60 * 5
147 rake_done = False
148 while time.time() < timeout and rake_done is False:
149 # This seems weird but we want to assume the rake is done, then if we
150 # find it in the process list, set rake_done back to False, I can't
151 # think of a good way to check this otherwise.
152 rake_done = True
153 for p in psutil.process_iter():
154 if 'rake' in p.name() or 'rake' in ' '.join(p.cmdline()):
155 rake_done = False
156 time.sleep(5)
157 if hookenv.config('plugins'):144 if hookenv.config('plugins'):
158 fetch_plugins()145 fetch_plugins()
159 # The ruby layer doesn't have a concept of ownership, so after the rakes146 # The ruby layer doesn't have a concept of ownership, so after the rakes

Subscribers

People subscribed via source and target branches