Skip to content

Commit

Permalink
Fix migration before server_id set in registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Leitsius committed Mar 12, 2018
1 parent c912a2a commit 8ead9c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openprocurement/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ def main(global_config, **settings):
for key in dockeys.split('\0'):
keyring[key[:8]] = Verifier(key)

config.registry.server_id = settings.get('id', '')
# migrate data
if not os.environ.get('MIGRATION_SKIP'):
for entry_point in iter_entry_points('openprocurement.api.migrations'):
plugin = entry_point.load()
plugin(config.registry)

config.registry.server_id = settings.get('id', '')
config.registry.health_threshold = float(settings.get('health_threshold', 99))
config.registry.update_after = asbool(settings.get('update_after', True))
return config.make_wsgi_app()

0 comments on commit 8ead9c4

Please sign in to comment.