mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
chg: [sync module] debug
This commit is contained in:
parent
188747417f
commit
0635bfedb6
1 changed files with 3 additions and 6 deletions
|
@ -48,8 +48,6 @@ class Sync_module(AbstractModule):
|
||||||
|
|
||||||
def compute(self, message):
|
def compute(self, message):
|
||||||
|
|
||||||
print(message)
|
|
||||||
|
|
||||||
### REFRESH DICT
|
### REFRESH DICT
|
||||||
if self.last_refresh < ail_2_ail.get_last_updated_sync_config():
|
if self.last_refresh < ail_2_ail.get_last_updated_sync_config():
|
||||||
self.last_refresh = time.time()
|
self.last_refresh = time.time()
|
||||||
|
@ -73,15 +71,14 @@ class Sync_module(AbstractModule):
|
||||||
# check filter + tags
|
# check filter + tags
|
||||||
for queue_uuid in self.dict_sync_queues:
|
for queue_uuid in self.dict_sync_queues:
|
||||||
filter_tags = self.dict_sync_queues[queue_uuid]['filter']
|
filter_tags = self.dict_sync_queues[queue_uuid]['filter']
|
||||||
print(tags)
|
|
||||||
print(filter_tags)
|
|
||||||
print(tags.issubset(filter_tags))
|
|
||||||
if filter_tags and tags:
|
if filter_tags and tags:
|
||||||
|
#print(message)
|
||||||
|
#print(f'tags: {tags} filter: {filter_tags}')
|
||||||
if tags.issubset(filter_tags):
|
if tags.issubset(filter_tags):
|
||||||
obj_dict = obj.get_default_meta()
|
obj_dict = obj.get_default_meta()
|
||||||
# send to queue push and/or pull
|
# send to queue push and/or pull
|
||||||
for dict_ail in self.dict_sync_queues[queue_uuid]['ail_instances']:
|
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,
|
ail_2_ail.add_object_to_sync_queue(queue_uuid, dict_ail['ail_uuid'], obj_dict,
|
||||||
push=dict_ail['push'], pull=dict_ail['pull'])
|
push=dict_ail['push'], pull=dict_ail['pull'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue