-
Notifications
You must be signed in to change notification settings - Fork 415
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
fix(tasks): Create a different task to update environment document #2807
Conversation
reduce transaction length to make #2709 more rare and improve wait time
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2807 +/- ##
=======================================
Coverage 95.53% 95.53%
=======================================
Files 994 994
Lines 28072 28074 +2
=======================================
+ Hits 26818 26820 +2
Misses 1254 1254
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One fairly minor comment, otherwise this looks good to me.
api/audit/models.py
Outdated
self.update_environments_updated_at() | ||
self.send_environments_to_dynamodb() | ||
self.send_environment_update_message() | ||
|
||
def update_environments_updated_at(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method feels like it could be named better since it's triggering another task to handle the environment update logic. It might also benefit from a docstring I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it does update the updated_at
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I can change it back to process_environment_update
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingChanges
Create a different task for updating environment document and sending SSE message in order to reduce the transaction length (earlier it was doing all of the above as well in the same transaction)
How did you test this code?
Adds unit tests