Commit 504a2d96 authored by 段英荣's avatar 段英荣

modify

parent 9bc6d76a
......@@ -121,9 +121,9 @@ class User(models.Model):
#todo 有的同组数据过大,导致celery cpu过高,暂时限制同组的数据大小,后续可能会去掉同组的数据
same_group_user_id_list = list()
group_items_list = list(GroupUserRole.objects.using(settings.SLAVE_DB_NAME).filter(user_id=self.user_id).values_list("group_id"))
group_items_list = list(GroupUserRole.objects.using(settings.SLAVE_DB_NAME).filter(user_id=self.user_id).values_list("group_id",flat=True))
for group_id in group_items_list:
user_items_list = list(GroupUserRole.objects.using(settings.SLAVE_DB_NAME).filter(group_id=group_id).values_list("user_id"))
user_items_list = list(GroupUserRole.objects.using(settings.SLAVE_DB_NAME).filter(group_id=group_id).values_list("user_id",flat=True))
for user_id in user_items_list:
same_group_user_id_list.append(user_id)
if len(same_group_user_id_list)>=100:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment