-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Activity index #9603
Activity index #9603
Conversation
d75f110
to
47c5ae6
Compare
return Activity.objects.filter( | ||
hidden=False, activity_type__in=['wall_post', 'status_update'] |
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.
alternatively you could do this in one query activities_index__key__startswith='profile'
@@ -183,7 +185,10 @@ class ActivitySitemap(Sitemap): | |||
limit = 5000 | |||
|
|||
def items(self): | |||
return Activity.objects.order_by('-pk').cache() | |||
activity_indexes = ActivityIndex.objects.all().values_list('activity__pk', flat=True) |
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.
id be interested in if this does 2 queries or 1 and if 2 which is more efficient.
options={ | ||
'abstract': False, | ||
}, | ||
), |
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.
is there a migration to backport all of the old activities?
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.
looks like its getting close . ill be curious if its actually more performant in a production-like setting. lets move forward on this! |
7c12b7f
to
96e3eae
Compare
b3cab77
to
3b07f52
Compare
e276966
to
df02065
Compare
189a4d6
to
58acf6a
Compare
Description
TO POPULATE INDEX
Type of ActivityIndex
tip:<id>
hackathon:<id>
bounty:<id>
kudo:<id>
grant:<id>
profile:<id>
project:<id>
Revisit Usage
Flows Tested to make sure ActivityIndex is populated