Skip to content

Commit

Permalink
pulling #281 changes and changing singleton equality tests to be pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
mekarpeles committed Mar 24, 2017
2 parents a6d975e + 79a4f5c commit f976884
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions conf/init/ol-solr-updater.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ stop on runlevel [!2345]

chdir /openlibrary
respawn
respawn limit 10 5

exec sudo -u vagrant python scripts/new-solr-updater.py -c /openlibrary/conf/openlibrary.yml --state-file /openlibrary/solr-update.offset --ol-url http://localhost/
9 changes: 5 additions & 4 deletions openlibrary/solr/update_work.py
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,7 @@ def load_configs(config_file):

global data_provider
global _ia_db
if data_provider == None:
if data_provider is None:
data_provider = get_data_provider(c_data_provider,_ia_db)

return data_provider
Expand All @@ -1781,10 +1781,11 @@ def load_configs(c_host,c_config,c_data_provider):
conf_file = c_config

global _ia_db
_ia_db = get_ia_db(config.runtime_config['ia_db'])
if ('ia_db' in config.runtime_config.keys()):
_ia_db = get_ia_db(config.runtime_config['ia_db'])

global data_provider
if data_provider == None:
if data_provider is None:
data_provider = get_data_provider(c_data_provider,_ia_db)

return data_provider
Expand Down Expand Up @@ -1822,7 +1823,7 @@ def main():
_ia_db = get_ia_db(config.runtime_config['ia_db'])

global data_provider
if data_provider == None:
if data_provider is None:
data_provider = get_data_provider(options.data_provider,_ia_db)


Expand Down

0 comments on commit f976884

Please sign in to comment.