fix: [sync module] fix tags filter

This commit is contained in:
Terrtia 2022-05-18 14:59:51 +02:00
parent c116713dc9
commit c765c86728
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -69,16 +69,16 @@ class Sync_module(AbstractModule):
tags = obj.get_tags(r_set=True)
# check filter + tags
#print(message)
for queue_uuid in self.dict_sync_queues:
filter_tags = self.dict_sync_queues[queue_uuid]['filter']
if filter_tags and tags:
#print(message)
#print(f'tags: {tags} filter: {filter_tags}')
if tags.issubset(filter_tags):
if filter_tags.issubset(tags):
obj_dict = obj.get_default_meta()
# send to queue push and/or pull
for dict_ail in self.dict_sync_queues[queue_uuid]['ail_instances']:
print(f'{dict_ail["ail_uuid"]} {message}')
print(f'ail_uuid: {dict_ail["ail_uuid"]} obj: {message}')
ail_2_ail.add_object_to_sync_queue(queue_uuid, dict_ail['ail_uuid'], obj_dict,
push=dict_ail['push'], pull=dict_ail['pull'])