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

Версия 21.7 и раньше

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

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

Пример для запуска с сервера приложения, если полный путь к утилите /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/env/bin/fab update suggestions_bank
05 01 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update suggestions_ip
10 01 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update suggestions_address
30 02 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update suggestions_geo
35 02 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update suggestions_geonames
40 02 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update suggestions_osm
00 03 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update suggestions_partyext update suggestions_party
00 04 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update factor_geocode
30 04 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update factor_fias
/opt/updater/download-dictionaries.sh
/opt/updater/env/bin/fab download suggestions_bank
/opt/updater/env/bin/fab download suggestions_ip
/opt/updater/env/bin/fab download suggestions_address
/opt/updater/env/bin/fab download suggestions_geo
/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 suggestions_email
/opt/updater/env/bin/fab download suggestions_fio
/opt/updater/env/bin/fab download factor_geocode
/opt/updater/env/bin/fab download factor_fias


Пример для запуска с внешней машины, если полный путь к утилите /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/env/bin/fab -H 10.0.1.34 update suggestions_bank
05 01 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update suggestions_ip
10 01 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update suggestions_address
30 02 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update suggestions_geo
35 02 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update suggestions_geonames
40 02 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update suggestions_osm
00 03 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update suggestions_partyext update suggestions_party
00 04 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update factor_geocode
30 04 * * 0  cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab -H 10.0.1.34 update factor_fias
/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_ip /tmp/dictionaries/suggestions_ip
/opt/updater/env/bin/fab download-to suggestions_address /tmp/dictionaries/suggestions_address
/opt/updater/env/bin/fab download-to suggestions_geonames /tmp/dictionaries/suggestions_geo
/opt/updater/env/bin/fab download-to suggestions_geonames /tmp/dictionaries/suggestions_geonames
/opt/updater/env/bin/fab download-to suggestions_geonames /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 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 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_ip /tmp/dictionaries/suggestions_ip
/opt/updater/env/bin/fab -H $SERVER scp suggestions_address /tmp/dictionaries/suggestions_address
/opt/updater/env/bin/fab -H $SERVER scp suggestions_geo /tmp/dictionaries/suggestions_geo
/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 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 factor_geocode /tmp/dictionaries/factor_geocode
/opt/updater/env/bin/fab -H $SERVER scp factor_fias /tmp/dictionaries/factor_fias
  • No labels