Skip to content

feat(room_at_capacity_mailer): [PPT-1721|PPT-1852] notify when people_count equals or exceeds capacity#540

Merged
stakach merged 5 commits into
masterfrom
feat_room_at_capacity_notification
Feb 12, 2025
Merged

feat(room_at_capacity_mailer): [PPT-1721|PPT-1852] notify when people_count equals or exceeds capacity#540
stakach merged 5 commits into
masterfrom
feat_room_at_capacity_notification

Conversation

@chillfox
Copy link
Copy Markdown
Contributor

No description provided.

@chillfox chillfox self-assigned this Feb 12, 2025
@chillfox chillfox requested a review from naqvis February 12, 2025 03:53
Copy link
Copy Markdown
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

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

This will send an email every 20 seconds while the room is at capacity
We probably want to do 2 things:

  1. track where rooms are at or over capacity (system_id => over_capactity_detected_count)
    increment the count every poll
  2. only send an email when the over_capactity_detected_count == 2 (i.e. 5min polling means email sent when over capacity for 10min)
  3. if a room drops below capacity then delete the system_id from the hash or set to 0

We might also want to ensure only one email is sent per meeting?
but i think the above should work well enough

Comment thread drivers/place/room_at_capacity_mailer.cr Outdated
@chillfox
Copy link
Copy Markdown
Contributor Author

There is a debounce_time_minutes option that limits how frequently notifications can go out for the same system.
requiring it to be over for multiple checks is a good idea, I will add that now.

@chillfox chillfox changed the title feat(room_at_capacity_mailer): [PPT-1721] notify when people_count equals or exceeds capacity feat(room_at_capacity_mailer): [PPT-1721|PPT-1852] notify when people_count equals or exceeds capacity Feb 12, 2025
@chillfox chillfox requested a review from stakach February 12, 2025 05:35
Copy link
Copy Markdown
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

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

minor change

Comment thread drivers/place/room_at_capacity_mailer.cr Outdated
Comment thread drivers/place/room_at_capacity_mailer.cr Outdated
@chillfox chillfox requested a review from stakach February 12, 2025 05:52
Copy link
Copy Markdown
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

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

LGTM

@stakach stakach merged commit fcee243 into master Feb 12, 2025
@stakach stakach deleted the feat_room_at_capacity_notification branch February 12, 2025 06:09
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.

2 participants