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

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

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

chillfox
Copy link
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
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

drivers/place/room_at_capacity_mailer.cr Outdated Show resolved Hide resolved
@chillfox
Copy link
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
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

drivers/place/room_at_capacity_mailer.cr Outdated Show resolved Hide resolved
drivers/place/room_at_capacity_mailer.cr Outdated Show resolved Hide resolved
@chillfox chillfox requested a review from stakach February 12, 2025 05:52
Copy link
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
3 of 6 checks passed
@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