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

Only trigger add_status_task when status is first created #2934

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

mouse-reeve
Copy link
Member

I think the reason I didn't do this initially was so that related users and books, which are added necessarily after the model instance is crated, will be part of the object when the task runs, but I have investigated this and because of the transaction.atomic statement in the to_model method in bookwyrm/activitypub/base_activity.py and in the status view (added in this commit), this is not an issue.

I think the reason I didn't do this initially was so that related users
and books, which are added necessarily after the model instance is
crated, will be part of the object when the task runs, but I have
investigated this and because of the transaction.atomic statement in the
to_model method in bookwyrm/activitypub/base_activity.py and in the
status view (added in this commit), this is not an issue.
@mouse-reeve mouse-reeve requested a review from WesleyAC August 1, 2023 02:39
@WesleyAC
Copy link
Member

WesleyAC commented Aug 1, 2023

Looks good, thank you for finding these! Let me know if you'd like me to cherrypick this onto b.s tonight, or you can do it yourself if you'd like.

@mouse-reeve mouse-reeve merged commit 211b60b into main Aug 1, 2023
@mouse-reeve mouse-reeve deleted the reduce-status-tasks branch August 1, 2023 15:30
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