def sync(ctx): """Syncs Spectrometer data Force syncs the git repositories to pull down the latest data. """ app = create_app(ctx.obj['conf']) gerrit_url = app.config['GERRIT_URL'] mirror_dir = app.config['MIRROR_DIR'] mirror_repos(mirror_dir, gerrit_url)
def start(ctx): """Runs the spectrometer server This function is effectively the spectrometer main() function and is the entry point for spectrometer server. """ app = create_app(ctx.obj['conf']) click.echo('Syncing Spectrometer data...') gerrit_url = app.config['GERRIT_URL'] mirror_dir = app.config['MIRROR_DIR'] mirror_repos(mirror_dir, gerrit_url) click.echo('Starting spectrometer...') app.run( threaded=True, host=app.config['LISTEN_HOST'], port=app.config['LISTEN_PORT'], )