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 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
|
||||
|
@ -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']
|
||||
|
Loading…
x
Reference in New Issue
Block a user