Skip to content
Snippets Groups Projects
Commit c797b3a5 authored by Kevin S. Hahn's avatar Kevin S. Hahn
Browse files

always upsert local site into sites collection

parent 7124c409
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,9 @@ for x in range(0, 30):
else:
raise Exception('Could not connect to MongoDB')
# TODO: make api_uri a required arg?
application.db.sites.update({'_id': args.site_id}, {'_id': args.site_id, 'name': args.site_name or 'Local', 'api_uri': args.api_uri, 'onload': True}, upsert=True)
if not args.ssl_cert:
log.warning('SSL certificate not specified, Scitran Central functionality disabled')
elif not args.api_uri:
......@@ -73,8 +76,6 @@ elif not args.central_uri:
else:
fail_count = 0
application.db.sites.update({'_id': args.site_id}, {'_id': args.site_id, 'name': args.site_name, 'api_uri': args.api_uri, 'onload': True}, upsert=True)
@uwsgidecorators.timer(60)
def centralclient_timer(signum):
global fail_count
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment