Commit 86728a13 authored by 高雅喆's avatar 高雅喆

使用slave1库

parent ab74ef6f
...@@ -247,10 +247,10 @@ def get_same_tagset_ids(tag_list): ...@@ -247,10 +247,10 @@ def get_same_tagset_ids(tag_list):
connection.close() connection.close()
logging.error("unable mysql connection and close") logging.error("unable mysql connection and close")
tag_set_list_id = list( tag_set_list_id = list(
CommunityTagSetRelation.objects.filter(tag_id__in=all_tag, is_deleted=False).values_list("tag_set_id", CommunityTagSetRelation.objects.using(settings.SLAVE1_DB_NAME).filter(tag_id__in=all_tag, is_deleted=False).values_list("tag_set_id",
flat=True)) flat=True))
tag_ids = list( tag_ids = list(
CommunityTagSetRelation.objects.filter(tag_set_id__in=tag_set_list_id, is_deleted=False).values_list( CommunityTagSetRelation.objects.using(settings.SLAVE1_DB_NAME).filter(tag_set_id__in=tag_set_list_id, is_deleted=False).values_list(
"tag_id", "tag_id",
flat=True)) flat=True))
all_tag.extend(tag_ids) all_tag.extend(tag_ids)
......
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