diff --git a/puppet/zulip/files/postgresql/process_fts_updates b/puppet/zulip/files/postgresql/process_fts_updates index 3645d20e34..a23286874d 100755 --- a/puppet/zulip/files/postgresql/process_fts_updates +++ b/puppet/zulip/files/postgresql/process_fts_updates @@ -66,18 +66,24 @@ try: os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings' from django.conf import settings remote_postgres_host = settings.REMOTE_POSTGRES_HOST + USING_PGROONGA = settings.USING_PGROONGA except ImportError as e: # process_fts_updates also supports running locally on a remote # postgres server; in that case, one can just connect to localhost remote_postgres_host = '' + USING_PGROONGA = False # Since we don't want a hard dependency on being able to access the # Zulip settings (as we may not be running on a server that has that # data), we determine whether we're using pgroonga using # /etc/zulip/zulip.conf. +# +# However, we still also check the `USING_PGROONGA` variable, since +# that's all we have in development. config_file = six.moves.configparser.RawConfigParser() config_file.read("/etc/zulip/zulip.conf") -USING_PGROONGA = config_file.has_option('machine', 'pgroonga') +if config_file.has_option('machine', 'pgroonga'): + USING_PGROONGA = True if remote_postgres_host != '': postgres_password = ''