|
3 | 3 | import util
|
4 | 4 |
|
5 | 5 | SEARCHABLE_APPS = {
|
6 |
| - 'calendars': ('frontend', 'panopticon:register'), |
7 |
| - 'frontend': ('frontend', 'rummager:index'), |
8 |
| - 'licencefinder': ('frontend', 'panopticon:register'), |
9 |
| - 'businesssupportfinder': ('frontend', 'panopticon:register'), |
10 |
| - 'publisher': ('backend', 'panopticon:register'), |
11 |
| - 'recommended-links': ('backend', 'rummager:index'), |
12 |
| - 'smartanswers': ('frontend', 'panopticon:register'), |
13 |
| - 'tariff': ('frontend', 'panopticon:register'), |
14 |
| - 'whitehall': ('backend', 'rummager:index'), |
| 6 | + 'calendars': ('frontend', ['panopticon:register']), |
| 7 | + 'frontend': ('frontend', ['rummager:index']), |
| 8 | + 'licencefinder': ('frontend', ['panopticon:register']), |
| 9 | + 'businesssupportfinder': ('frontend', ['panopticon:register']), |
| 10 | + 'publisher': ('backend', ['panopticon:register']), |
| 11 | + 'recommended-links': ('backend', ['rummager:index']), |
| 12 | + 'smartanswers': ('frontend', ['panopticon:register']), |
| 13 | + 'tariff': ('frontend', ['panopticon:register']), |
| 14 | + 'whitehall': ('backend', ['rummager:index']), |
15 | 15 | }
|
16 | 16 |
|
17 | 17 | @task
|
@@ -51,12 +51,13 @@ def reindex(app=None):
|
51 | 51 | def reindex_app(app):
|
52 | 52 | puts("Rebuilding search index for application '%s'" % app)
|
53 | 53 |
|
54 |
| - machine_class, task = SEARCHABLE_APPS[app] |
| 54 | + machine_class, tasks = SEARCHABLE_APPS[app] |
55 | 55 | util.use_random_host('class-%s' % machine_class)
|
56 | 56 |
|
57 |
| - # FIXME: Remove this horrible hack of a hack for a hack |
58 |
| - if app == 'recommended-links': |
59 |
| - with cd('/data/vhost/recommended-links.*/current'): |
60 |
| - sudo('govuk_setenv default bundle exec rake -v "%s"' % task, user='deploy') |
61 |
| - else: |
62 |
| - util.rake(app, task) |
| 57 | + for task in tasks: |
| 58 | + # FIXME: Remove this horrible hack of a hack for a hack |
| 59 | + if app == 'recommended-links': |
| 60 | + with cd('/data/vhost/recommended-links.*/current'): |
| 61 | + sudo('govuk_setenv default bundle exec rake -v "%s" --trace' % task, user='deploy') |
| 62 | + else: |
| 63 | + util.rake(app, task) |
0 commit comments