Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 8 #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Task 8 #20

wants to merge 1 commit into from

Conversation

avbelyshev
Copy link

No description provided.

Copy link
Collaborator

@spajic spajic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Воркеры, забившие все потоки, создавались колбэками, вызванными при приеме товарных остатков от ERP. Менеджеры выгружают остатки - работа встает.
В воркере вызывался запрос на изменение параметра у товаров, обернутый в транзакцию, в которой отключались/включались триггеры нескольких таблиц.

Для быстрого снятия остроты ситуации убил задачи в Sidekiq, освободив тем самым очередь.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тушение пожаров 🚒🚒🚒


3. Пару недель назад поставил `gem pghero`, некоторое время подождал сбора статистики.

- Удалил 22 duplicate indexes, добавил 1 suggested index.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 pg_hero кайф

- Замерил время рендеринга каталога товаров (по логам рельс :facepalm).
- Сделал миграцию с удалением триггеров и mat.view, созданием view.
- Замерил время рендеринга каталога товаров после миграции.
- Время не изменилось, зато недопустимые затраты на поддержание mat.view перестали быть.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classic🌚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants