chg: [sync module] debug

pull/586/head
Terrtia 2022-05-17 14:35:28 +02:00
parent 188747417f
commit 0635bfedb6
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 3 additions and 6 deletions

View File

@ -48,8 +48,6 @@ class Sync_module(AbstractModule):
def compute(self, message):
print(message)
### REFRESH DICT
if self.last_refresh < ail_2_ail.get_last_updated_sync_config():
self.last_refresh = time.time()
@ -73,15 +71,14 @@ class Sync_module(AbstractModule):
# check filter + tags
for queue_uuid in self.dict_sync_queues:
filter_tags = self.dict_sync_queues[queue_uuid]['filter']
print(tags)
print(filter_tags)
print(tags.issubset(filter_tags))
if filter_tags and tags:
#print(message)
#print(f'tags: {tags} filter: {filter_tags}')
if tags.issubset(filter_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}')
ail_2_ail.add_object_to_sync_queue(queue_uuid, dict_ail['ail_uuid'], obj_dict,
push=dict_ail['push'], pull=dict_ail['pull'])