Update manage to serve DB (create with spec version)
This commit is contained in:
parent
d4668833dc
commit
eeebf5f8d3
@ -192,12 +192,14 @@ _Внимание_! Только Python 3 (для 2.7 пока есть отде
|
|||||||
sudo gunicorn -c gunicorn.conf.py wsgi:application &
|
sudo gunicorn -c gunicorn.conf.py wsgi:application &
|
||||||
sudo service nginx start
|
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
|
cd /var/www/fias-api
|
||||||
sudo gunicorn -c gunicorn.conf.py wsgi:application &
|
gunicorn -c gunicorn.conf.py wsgi:application &
|
||||||
|
|
||||||
|
exit 0
|
||||||
```
|
```
|
||||||
|
|
||||||
## Api
|
## Api
|
||||||
|
@ -60,6 +60,10 @@ def get_allowed_updates(updates_str, mode="create"):
|
|||||||
yield all_versions[-1]
|
yield all_versions[-1]
|
||||||
else:
|
else:
|
||||||
assert len(user_defined_list) == 1, "Ony single update number allowed for DB create"
|
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":
|
if mode == "update":
|
||||||
for uv in all_versions:
|
for uv in all_versions:
|
||||||
uv_ver = uv['intver']
|
uv_ver = uv['intver']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user