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

Better way to turn Hazebot on and off #240

Open
ianhoffman opened this issue Jan 31, 2022 · 0 comments
Open

Better way to turn Hazebot on and off #240

ianhoffman opened this issue Jan 31, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ianhoffman
Copy link
Collaborator

After we turn Hazebot back on after an extended time of being deactivated, the app should know not to message users if their AQI differs from what it was the last time Hazebot was active. Instead, it should start counting at the time at which Hazebot was re-activated. Similarly, when sending share requests we shouldn't just look at when the user last got a share request; we should also check when the app was last activated.

To do this:

  • Add a config table which contains the app's current status (on/off).
  • When sending alerts, calculate the timestamp of the last alert as max(last_alert_ts, app_reactivated_at_ts)
  • When sending share requests, calculate the last share request as max(last_share_request_ts, app_reactivated_at_ts)

We should do this before turning Hazebot back on in June.

@ianhoffman ianhoffman self-assigned this Jan 31, 2022
@ianhoffman ianhoffman added the enhancement New feature or request label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant