diff --git a/README.md b/README.md index 6522a2c..1fe26dd 100644 --- a/README.md +++ b/README.md @@ -192,12 +192,14 @@ _Внимание_! Только Python 3 (для 2.7 пока есть отде sudo gunicorn -c gunicorn.conf.py wsgi:application & sudo service nginx start ``` -- После перезапуска нужно сделать следующее (TODO): +- В пристейшем случае Ваш `/etc/rc.local` может выглядеть так, как ниже. Лмбо используйте аналоги supervisor. ``` - sudo searchd --config /usr/local/etc/sphinx.conf + searchd --config /usr/local/etc/sphinx.conf cd /var/www/fias-api - sudo gunicorn -c gunicorn.conf.py wsgi:application & + gunicorn -c gunicorn.conf.py wsgi:application & + + exit 0 ``` ## Api diff --git a/manage.py b/manage.py index f17ef3f..71549fc 100644 --- a/manage.py +++ b/manage.py @@ -60,6 +60,10 @@ def get_allowed_updates(updates_str, mode="create"): yield all_versions[-1] else: assert len(user_defined_list) == 1, "Ony single update number allowed for DB create" + if user_defined_list[0] in all_versions: + yield user_defined_list[0] + else: + raise Exception("Update #%d not found on remote server" % user_defined_list[0]) if mode == "update": for uv in all_versions: uv_ver = uv['intver']