# Обновление настроек кастомизатора в Itgrix\_bx-3.9.0 и Itgrix\_amo-2.12.0

## Перенос Settings.php в settings.json

{% hint style="info" %}
Изменения описаны для Itgrix\_bx. Для Itgrix\_amo всё так же, только пути будут содержать `itgrix_amo` вместо `itgrix_bx`.
{% endhint %}

[Начиная с версий Itgrix\_bx-3.4.0 и Itgrix\_amo-2.6.0](/custom_common/obnovlenie-kastomizatora-v-itgrix_bx-3.4.0-i-itgrix_amo-2.6.0.md) файлы кастомизатора хранятся в одной папке `/opt/itgrix_bx/customizer/`. В частности настройки хранились в файле `/opt/itgrix_bx/customizer/Settings.php`.

В версии Itgrix\_bx (Битрикс24) 3.9.0 и Itgrix\_amo (amoCRM) 2.12.0 настройки кастомизатора перенесены из файла `Settings.php` в `settings.json` (`/opt/itgrix_bx/customizer/settings.json`).

Старый файл `Settings.php` содержит следующие настройки:

```php
class Settings {
    const CONFIG_CRM_FIELD    = 'bitrix'; // Название поля в CONFIG_PATH
    const CONFIG_PATH         = '/etc/itgrix_bx/config.json';
    const LOG_PATH            = '/var/log/itgrix_bx.log';
}
```

Новый файл настроек `settings.json`:

```json
{
  "configCrmField": "bitrix",
  "configPath": "/etc/itgrix_bx/config.json",
  "logPath": "/var/log/itgrix_bx.log",
  "requestTimeoutSec": 2
}
```

Для Itgrix\_amo файл настроек `settings.json` будет выглядеть так:

```json
{
  "configCrmField": "amo",
  "configPath": "/etc/itgrix_amo/config.json",
  "logPath": "/var/log/itgrix_amo.log",
  "requestTimeoutSec": 2
}
```

## Новое поле `requestTimeoutSec`

Поле `requestTimeoutSec` содержит таймаут в секундах для HTTP-запросов (например, [запросов в CRM](/custom_common/obnovlenie-kastomizatora-v-itgrix_bx-3.4.0-i-itgrix_amo-2.6.0.md)). Ранее таймаут был задан в коде кастомизатора и был всегда равен 2 секунды.

Теперь, в случае необходимости, можно поменять таймаут (например, если известно, что CRM сильно загружена и долго отвечает на запросы). При этом необходимо соответственно увеличить таймаут работы кастомизатора в настройках модуля (`http://<Asterisk IP>:8077/config/module`, настройка "Таймаут скрипта кастомизации, сек.").


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.itgrix.ru/custom_common/customizer-settings-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
