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

Reimplement notification functionality using database, not cache #64

Open
anatoliyfedorenko opened this issue Aug 20, 2019 · 6 comments

Comments

@anatoliyfedorenko
Copy link
Contributor

now notification and reminder functionality is implemented using cache and omitting working with databases. Thus, when editing deadline there is an update needed to take care of cache. + if bot is restarted, all reminders are off automatic. This should be reimplemented using database.

  1. Create a reminder model
  2. Modify existing functionality to use this model
  3. Implement functionality to send reminders using the model (by now, it should remind 3 times with 30 minutes interval in between

Add comments when needed...

@BekbolotGM
Copy link
Contributor

Изучаю функции в файле notifications.go

@BekbolotGM
Copy link
Contributor

Разобрал функцию StartWatchers() , понял как она работает.
Также разобрал функцию trackStandupersIn().
Продолжаю подробно изучать оставшиееся функции.

@BekbolotGM
Copy link
Contributor

Продолжаю изучение кода, после того как разберусь с этим делом, составлю план реализации задачи.

@BekbolotGM
Copy link
Contributor

Разобрался с кодом. Сейчайс подумаю от том как можно реализовать задачу и составлю план действий.

@BekbolotGM
Copy link
Contributor

Составляю план действий.

@BekbolotGM
Copy link
Contributor

1.Модель.
Создать модель, определить ее поля. Описать поля модели.
2.Миграция.
Написать миграцию, то есть определить структуру таблицы основываясь на модели.
3. Методы БД.
Написать функцию выполняющие команды создания, обновления, удаления, получения записи из таблицы в БД.(Возможно понадобятся другие методы)
4. Написать функцию ExecThread().
Функция будет искать тех пользователей, которые не написали стендап и уведомлять их каждые 30 мин.
Нужно учесть такие моменты как:

  • время дедлайна может быть не установлено
  • время дедлайна может быть перенесено

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

No branches or pull requests

2 participants