Skip to content

Conversation

@vazgmik
Copy link

@vazgmik vazgmik commented Apr 16, 2025

Relates #895


Note: by creating a PR or an issue you automatically agree to the CLA. See CONTRIBUTING.md. Feel free to remove this note, the agreement holds.

@vazgmik vazgmik force-pushed the 895-feat-pt-time-point branch 2 times, most recently from 6731cd2 to ed36286 Compare April 22, 2025 06:54
@vazgmik vazgmik force-pushed the 895-feat-pt-time-point branch from ed36286 to b6ee85c Compare May 2, 2025 16:35
@vazgmik vazgmik force-pushed the 895-feat-pt-time-point branch from b6ee85c to e39b5f0 Compare May 13, 2025 17:41
struct Settings final {
struct TimePoint {
std::uint8_t hour;
std::uint8_t minute;
Copy link
Collaborator

Choose a reason for hiding this comment

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

если есть что-то про время, должно быть и про таймзону

struct Settings final {
struct TimePoint {
std::uint8_t hour;
std::uint8_t minute;
Copy link
Collaborator

Choose a reason for hiding this comment

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

лучше инициализировать нулями, чем оставлять мусорные значения


/// @brief Time point for the task execution. Task is repeated every
/// hour:minute UTC of the current/next day
std::optional<TimePoint> strong_mode_anchor;
Copy link
Collaborator

Choose a reason for hiding this comment

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

как-то костыльненько выглядит
у нас есть параметры внутри Settings, и тут они частично переопределяются
лучше написать отдельный класс, который работает по расписанию и не обладает инвариантами PeriodicTask

@vazgmik vazgmik force-pushed the 895-feat-pt-time-point branch from e39b5f0 to 248e505 Compare May 15, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants