fix: 修改过期节点资产映射缓存清除

pull/6675/head
Bai 3 years ago committed by Jiangjie.Bai
parent aa37d86959
commit 228446979f

@ -48,7 +48,6 @@ def expire_node_assets_mapping_for_memory(org_id):
Node.expire_node_all_asset_ids_mapping_from_cache(root_org_id) Node.expire_node_all_asset_ids_mapping_from_cache(root_org_id)
node_assets_mapping_for_memory_pub_sub.publish(org_id) node_assets_mapping_for_memory_pub_sub.publish(org_id)
node_assets_mapping_for_memory_pub_sub.publish(root_org_id)
@receiver(post_save, sender=Node) @receiver(post_save, sender=Node)
@ -86,7 +85,9 @@ def subscribe_node_assets_mapping_expire(sender, **kwargs):
if message["type"] != "message": if message["type"] != "message":
continue continue
org_id = message['data'].decode() org_id = message['data'].decode()
root_org_id = Organization.ROOT_ID
Node.expire_node_all_asset_ids_mapping_from_memory(org_id) Node.expire_node_all_asset_ids_mapping_from_memory(org_id)
Node.expire_node_all_asset_ids_mapping_from_memory(root_org_id)
logger.debug( logger.debug(
"Expire node assets id mapping from memory of org={}, pid={}" "Expire node assets id mapping from memory of org={}, pid={}"
"".format(str(org_id), os.getpid()) "".format(str(org_id), os.getpid())

Loading…
Cancel
Save