-
Notifications
You must be signed in to change notification settings - Fork 0
Hw4 #3
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
base: master
Are you sure you want to change the base?
Conversation
Code Coverage
|
edikgoose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почини пайплайн, пожалуйста) (-1 балл)
Остальное все хорошо. Не совсем понял твой вопрос по ссылки, можешь поподробнее плиз расписать?
| - postgresql:/var/lib/postgresql/data | ||
| networks: | ||
| - backend | ||
| liquibase-migrations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Миграции лучше хранить в модуле, в котором используется эта бдшечка. В твоем случае это scrapper. В resources закидай
| CREATE TABLE IF NOT EXISTS link | ||
| ( | ||
| id BIGINT PRIMARY KEY, | ||
| url VARCHAR(255) UNIQUE NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
У нас обычно TEXT используется. В целом, во всем удобнее
| @CsvSource({"SELECT EXISTS (SELECT FROM pg_tables WHERE tablename = 'chat');", | ||
| "SELECT EXISTS (SELECT FROM pg_tables WHERE tablename = 'link');", | ||
| "SELECT EXISTS (SELECT FROM pg_tables WHERE tablename = 'chat_link');"}) | ||
| public void tableExistsTest(String query) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Обычно миграции не тестят, но пусть будет)
Привет! Прости, что пропала, был завал на учебе :с
На базе IntegrationTest добавила запуск миграций + сделала небольшой тест для проверки миграции базы данных и создания нужных таблиц. Не уверена, стоит ли их разделять на 2 разных теста.
Хотела уточнить насчет разделения ссылок по сервисам. На данный момент оно актуально при добавлении в бд(в таблице link есть поле service_name) и получении списка отслеживаемых ссылок(так как группируем их по сервису). Пока что у меня из идей только фильтровать их по сервису при вызове \list, но тогда есть сценарий, когда бот будет многократно выполнять одну и ту же операцию за короткий промежуток времени. Есть ли какой-то хороший способ организовать это разделение(возможно, кэшировать этот список)?