mirror of https://github.com/CIRCL/AIL-framework
fix: [urlextract importer] fix parent map + replace set JSON queue by list
parent
bae2fd79df
commit
8c864fdba0
|
@ -46,10 +46,10 @@ def get_json_importer_list():
|
|||
|
||||
def add_json_to_json_queue(json_item):
|
||||
json_item = json.dumps(json_item)
|
||||
r_serv_db.sadd('importer:json:item', json_item)
|
||||
r_serv_db.rpush('importer:json:item', json_item)
|
||||
|
||||
def get_json_item_to_import():
|
||||
return r_serv_db.spop('importer:json:item')
|
||||
return r_serv_db.lpop('importer:json:item')
|
||||
|
||||
def get_json_receiver_class(feeder_name_in):
|
||||
global importer_list
|
||||
|
|
|
@ -32,9 +32,6 @@ def add_item_parent_by_parent_id(parent_type, parent_id, item_id):
|
|||
add_item_parent(parent_item_id, item_id)
|
||||
|
||||
def add_item_parent(parent_item_id, item_id):
|
||||
if not exist_item(parent_item_id):
|
||||
return False
|
||||
else:
|
||||
r_serv_metadata.hset('paste_metadata:{}'.format(item_id), 'father', parent_item_id)
|
||||
r_serv_metadata.sadd('paste_children:{}'.format(parent_item_id), item_id)
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue