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

Surge Alert Status and Ordering based on status and opens fields #2040

Merged
merged 6 commits into from
Feb 13, 2024

Conversation

susilnem
Copy link
Member

@susilnem susilnem commented Feb 9, 2024

Addresses

Changes

  • Add Status Field in Alert
  • Add status in enums
  • Create Cronjob Command to update the Alert status

Post deployment actions

@szabozoltan69 We need to run this after deployment to update the status. After that, it will be updated every 12 hours.

./manage.py update_surge_alert_status

Checklist

Things that should succeed before merging.

  • Updated/ran unit tests
  • Updated CHANGELOG.md

Release

If there is a version update, make sure to tag the repository with the latest version.

@susilnem susilnem changed the title Add status field in alert Surge Alert Status and Ordering based on status and opens fields Feb 9, 2024
@susilnem susilnem requested a review from k9845 February 9, 2024 10:24
@k9845 k9845 marked this pull request as ready for review February 12, 2024 08:17
Copy link
Contributor

@k9845 k9845 left a comment

Choose a reason for hiding this comment

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

lets add test case as well

@k9845 k9845 marked this pull request as draft February 12, 2024 08:41
k9845

This comment was marked as duplicate.

Copy link
Member

@thenav56 thenav56 left a comment

Choose a reason for hiding this comment

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

Looks good. Few comments

notifications/models.py Show resolved Hide resolved
notifications/tests.py Outdated Show resolved Hide resolved
notifications/management/commands/update_alert_status.py Outdated Show resolved Hide resolved
notifications/management/commands/update_alert_status.py Outdated Show resolved Hide resolved
notifications/models.py Outdated Show resolved Hide resolved
- Mock timezone.now
@thenav56 thenav56 marked this pull request as ready for review February 13, 2024 10:25
@thenav56
Copy link
Member

Hey @szabozoltan69, could you review and merge/deploy this to staging?

@szabozoltan69 szabozoltan69 merged commit ad81de0 into develop Feb 13, 2024
1 check passed
@szabozoltan69 szabozoltan69 deleted the fix/surge-alert branch February 13, 2024 10:39
@thenav56
Copy link
Member

Hey @szabozoltan69

We also need to run this after deployment to initiate the status. After that, it will be updated every 12 hours.

./manage.py update_surge_alert_status

@szabozoltan69
Copy link
Contributor

szabozoltan69 commented Feb 13, 2024

Hey @thenav56
Deployment to Staging was ok, also the migration:
Running migrations:
Applying notifications.0014_surgealert_status... OK
Also this was run flawless:
./manage.py update_surge_alert_status

@k9845
Copy link
Contributor

k9845 commented May 15, 2024

@szabozoltan69 Can you run ./manage.py update_surge_alert_status command on production? I think we missed this.

@szabozoltan69
Copy link
Contributor

Now I did it.

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.

4 participants