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