permission entity tree list
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from text_normalizer import TextNormalizer
|
||||
# from general import *
|
||||
from general_functions import *
|
||||
from elastic_helper import ElasticHelper
|
||||
from create_relation_tags import *
|
||||
from temp_refactor_gn_dataset import *
|
||||
|
||||
from temp_LawSection_content import *
|
||||
|
||||
# cursor, cnxn = create_cursor()
|
||||
# import_law_section_to_elastic(cursor)
|
||||
|
||||
|
||||
load_dotenv(dotenv_path='config.env')
|
||||
|
||||
|
||||
host=os.getenv('HOST_160')
|
||||
password=os.getenv('HOST_160_PASS')
|
||||
|
||||
print(host)
|
||||
# print(password)
|
||||
|
||||
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
|
||||
elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||
|
||||
|
||||
|
||||
def import_prev_qanon_info(elastic, file_excel, index_name_o):
|
||||
|
||||
# خواند اکسل file_excel
|
||||
|
||||
list = []
|
||||
for item in list :
|
||||
# item ....
|
||||
|
||||
eid = 0 ### ??
|
||||
data = {
|
||||
|
||||
}
|
||||
|
||||
try:
|
||||
resp = elastic.update_index_doc(True, index_name_o, eid, data)
|
||||
except Exception as e:
|
||||
save_error(id, e)
|
||||
|
||||
|
||||
file_excel = ''
|
||||
import_prev_qanon_info(elastic, file_excel, "mj_qa_section" )
|
||||
Reference in New Issue
Block a user