Page tree
Skip to end of metadata
Go to start of metadata

Если у вас версия 21.7 или раньше

Обновляйте справочники только последовательно, по одному за раз. Никогда не запускайте одновременно индексацию двух и более справочников.

В версиях 21.8+ можно запускать обновление одновременно — «Подсказки» все равно будут индексировать справочники последовательно.

Чтобы регулярно скачивать и обновлять справочники, добавьте задачи в крон.

Пример для запуска с сервера приложения (строго для версий 21.8+), если полный путь к утилите /opt/updater:

00 21 * * 6  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/download-dictionaries.sh
00 01 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/update-dictionaries.sh
/opt/updater/download-dictionaries.sh
/opt/updater/env/bin/fab download suggestions_bank
/opt/updater/env/bin/fab download suggestions_email
/opt/updater/env/bin/fab download suggestions_fio
/opt/updater/env/bin/fab download suggestions_ip
 
/opt/updater/env/bin/fab download suggestions_eas
/opt/updater/env/bin/fab download suggestions_geo
/opt/updater/env/bin/fab download suggestions_house
/opt/updater/env/bin/fab download suggestions_iso3166
/opt/updater/env/bin/fab download suggestions_geonames
/opt/updater/env/bin/fab download suggestions_osm

/opt/updater/env/bin/fab download suggestions_party
/opt/updater/env/bin/fab download suggestions_partyext

/opt/updater/env/bin/fab download factor_geocode
/opt/updater/env/bin/fab download factor_fias
/opt/updater/update-dictionaries.sh
/opt/updater/env/bin/fab update suggestions_bank
/opt/updater/env/bin/fab update suggestions_email
/opt/updater/env/bin/fab update suggestions_fio
/opt/updater/env/bin/fab update suggestions_ip

/opt/updater/env/bin/fab update suggestions_address
/opt/updater/env/bin/fab update suggestions_flat
/opt/updater/env/bin/fab update suggestions_stead
/opt/updater/env/bin/fab update suggestions_geonames
/opt/updater/env/bin/fab update suggestions_osm

/opt/updater/env/bin/fab update suggestions_party

/opt/updater/env/bin/fab update factor_geocode
/opt/updater/env/bin/fab update factor_fias


Пример для запуска с внешней машины (строго для версий 21.8+), если полный путь к утилите /opt/updater, а 10.0.1.34 — адрес сервера приложения:

00 21 * * 6  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/download-dictionaries.sh
00 23 * * 6  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/copy-dictionaries.sh
00 01 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/update-dictionaries.sh
/opt/updater/download-dictionaries.sh
/opt/updater/env/bin/fab download-to suggestions_bank /tmp/dictionaries/suggestions_bank
/opt/updater/env/bin/fab download-to suggestions_email /tmp/dictionaries/suggestions_email
/opt/updater/env/bin/fab download-to suggestions_fio /tmp/dictionaries/suggestions_fio
/opt/updater/env/bin/fab download-to suggestions_ip /tmp/dictionaries/suggestions_ip
 
/opt/updater/env/bin/fab download-to suggestions_eas /tmp/dictionaries/suggestions_eas
/opt/updater/env/bin/fab download-to suggestions_geo /tmp/dictionaries/suggestions_geo
/opt/updater/env/bin/fab download-to suggestions_house /tmp/dictionaries/suggestions_house
/opt/updater/env/bin/fab download-to suggestions_iso3166 /tmp/dictionaries/suggestions_iso3166
/opt/updater/env/bin/fab download-to suggestions_geonames /tmp/dictionaries/suggestions_geonames
/opt/updater/env/bin/fab download-to suggestions_osm /tmp/dictionaries/suggestions_osm

/opt/updater/env/bin/fab download-to suggestions_party /tmp/dictionaries/suggestions_party
/opt/updater/env/bin/fab download-to suggestions_partyext /tmp/dictionaries/suggestions_partyext

/opt/updater/env/bin/fab download-to factor_geocode /tmp/dictionaries/factor_geocode
/opt/updater/env/bin/fab download-to factor_fias /tmp/dictionaries/factor_fias
/opt/updater/copy-dictionaries.sh
SERVER="10.0.1.34"
/opt/updater/env/bin/fab -H $SERVER scp suggestions_bank /tmp/dictionaries/suggestions_bank
/opt/updater/env/bin/fab -H $SERVER scp suggestions_email /tmp/dictionaries/suggestions_email
/opt/updater/env/bin/fab -H $SERVER scp suggestions_fio /tmp/dictionaries/suggestions_fio
/opt/updater/env/bin/fab -H $SERVER scp suggestions_ip /tmp/dictionaries/suggestions_ip

/opt/updater/env/bin/fab -H $SERVER scp suggestions_eas /tmp/dictionaries/suggestions_eas
/opt/updater/env/bin/fab -H $SERVER scp suggestions_geo /tmp/dictionaries/suggestions_geo
/opt/updater/env/bin/fab -H $SERVER scp suggestions_house /tmp/dictionaries/suggestions_house
/opt/updater/env/bin/fab -H $SERVER scp suggestions_iso3166 /tmp/dictionaries/suggestions_iso3166
/opt/updater/env/bin/fab -H $SERVER scp suggestions_geonames /tmp/dictionaries/suggestions_geonames
/opt/updater/env/bin/fab -H $SERVER scp suggestions_osm /tmp/dictionaries/suggestions_osm

/opt/updater/env/bin/fab -H $SERVER scp suggestions_party /tmp/dictionaries/suggestions_party
/opt/updater/env/bin/fab -H $SERVER scp suggestions_partyext /tmp/dictionaries/suggestions_partyext

/opt/updater/env/bin/fab -H $SERVER scp factor_geocode /tmp/dictionaries/factor_geocode
/opt/updater/env/bin/fab -H $SERVER scp factor_fias /tmp/dictionaries/factor_fias
/opt/updater/update-dictionaries.sh
SERVER="10.0.1.34"
/opt/updater/env/bin/fab -H $SERVER update suggestions_bank
/opt/updater/env/bin/fab -H $SERVER update suggestions_email
/opt/updater/env/bin/fab -H $SERVER update suggestions_fio
/opt/updater/env/bin/fab -H $SERVER update suggestions_ip

/opt/updater/env/bin/fab -H $SERVER update suggestions_address
/opt/updater/env/bin/fab -H $SERVER update suggestions_flat
/opt/updater/env/bin/fab -H $SERVER update suggestions_stead
/opt/updater/env/bin/fab -H $SERVER update suggestions_geonames
/opt/updater/env/bin/fab -H $SERVER update suggestions_osm

/opt/updater/env/bin/fab -H $SERVER update suggestions_party

/opt/updater/env/bin/fab -H $SERVER update factor_geocode
/opt/updater/env/bin/fab -H $SERVER update factor_fias
  • No labels