1
This commit is contained in:
+27
-19
@@ -294,17 +294,17 @@ def import_option_base_list(elastic):
|
|||||||
"main_key": "qasection_before_info_commission",
|
"main_key": "qasection_before_info_commission",
|
||||||
"main_label": "پروند - عنوان کمیسیونها",
|
"main_label": "پروند - عنوان کمیسیونها",
|
||||||
},
|
},
|
||||||
{"main_key": "rgsection_tsref", "main_label": "مقررات - مرجع تصویب ها"},
|
{"main_key": "rgsection_tsref", "main_label": "شناسنامه مقررات - مرجع تصویب ها"},
|
||||||
{"main_key": "qasection_tsref", "main_label": "قانون - مرجع تصویب ها"},
|
{"main_key": "qasection_tsref", "main_label": "شناسنامه قانون - مرجع تصویب ها"},
|
||||||
{
|
{
|
||||||
"group_key": "majles_it_base",
|
"group_key": "majles_it_base",
|
||||||
"main_key": "qasection_qanon_etebar",
|
"main_key": "qasection_qanon_etebar",
|
||||||
"main_label": "وضعیت اعتبار قانون",
|
"main_label": "قانون - وضعیت اعتبار",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group_key": "majles_it_base",
|
"group_key": "majles_it_base",
|
||||||
"main_key": "qasection_state_etebar",
|
"main_key": "qasection_state_etebar",
|
||||||
"main_label": "وضعیت اعتبار جزء قانون",
|
"main_label": "قانون - وضعیت اعتبار جزء",
|
||||||
},
|
},
|
||||||
{"main_key": "qasection_doc_tags", "main_label": "انواع قانون برای فهرست سازی"},
|
{"main_key": "qasection_doc_tags", "main_label": "انواع قانون برای فهرست سازی"},
|
||||||
{"main_key": "qasection_doc_states", "main_label": "صحت سنجی - وضعیت قانون"},
|
{"main_key": "qasection_doc_states", "main_label": "صحت سنجی - وضعیت قانون"},
|
||||||
@@ -538,20 +538,7 @@ def import_option_parleman_members(elastic, index_name_o="gn_option"):
|
|||||||
elastic.es.index(index=index_name_o, id=eid, document=data)
|
elastic.es.index(index=index_name_o, id=eid, document=data)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def import_option_others(elastic, index_name_o="gn_option"):
|
||||||
|
|
||||||
index_name_o="gn_option"
|
|
||||||
|
|
||||||
|
|
||||||
# ---مرحله اول
|
|
||||||
# import_tlist_projects()
|
|
||||||
|
|
||||||
import_option_base_list(elastic)
|
|
||||||
|
|
||||||
import_option_parleman_members(elastic)
|
|
||||||
|
|
||||||
import_option_codes(elastic)
|
|
||||||
|
|
||||||
|
|
||||||
###-------------------------------------------
|
###-------------------------------------------
|
||||||
res = get_organs()
|
res = get_organs()
|
||||||
@@ -607,7 +594,7 @@ if __name__ == "__main__":
|
|||||||
titles.append(title)
|
titles.append(title)
|
||||||
|
|
||||||
eid = "mb_organ_1"
|
eid = "mb_organ_1"
|
||||||
group_key = "عناوین انتخابی برنامه"
|
group_key = "عناوین انتخابی فرمها"
|
||||||
main_key = "organ_defualt"
|
main_key = "organ_defualt"
|
||||||
main_label = "سازمانهای پیش فرض قانون جدید"
|
main_label = "سازمانهای پیش فرض قانون جدید"
|
||||||
|
|
||||||
@@ -621,3 +608,24 @@ if __name__ == "__main__":
|
|||||||
"titles": titles,
|
"titles": titles,
|
||||||
}
|
}
|
||||||
elastic.es.index(index=index_name_o, id=eid, document=data)
|
elastic.es.index(index=index_name_o, id=eid, document=data)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
index_name_o="gn_option"
|
||||||
|
|
||||||
|
|
||||||
|
# ---مرحله اول
|
||||||
|
# import_tlist_projects()
|
||||||
|
|
||||||
|
# import_option_base_list(elastic)
|
||||||
|
|
||||||
|
# import_option_parleman_members(elastic)
|
||||||
|
|
||||||
|
# import_option_codes(elastic)
|
||||||
|
|
||||||
|
# import_option_others(elastic)
|
||||||
|
|
||||||
|
|
||||||
|
# elastic.backupIndexToZipfile("G:/Project2/111", "gn_tree", "gn_tree")
|
||||||
|
# elastic.backupIndexToZipfile("G:/Project2/111", "gn_option", "gn_option")
|
||||||
|
|
||||||
|
|||||||
+11
-3
@@ -28,8 +28,11 @@ load_dotenv(dotenv_path="config.env")
|
|||||||
# host = os.getenv("HOST_160_LOCAL")
|
# host = os.getenv("HOST_160_LOCAL")
|
||||||
# password = os.getenv("HOST_160_PASS")
|
# password = os.getenv("HOST_160_PASS")
|
||||||
|
|
||||||
host = os.getenv("HOST_60")
|
# host = os.getenv("HOST_60")
|
||||||
password = os.getenv("HOST_60_PASS")
|
# password = os.getenv("HOST_60_PASS")
|
||||||
|
|
||||||
|
host = os.getenv("HOST_133")
|
||||||
|
password = os.getenv("HOST_133_PASS")
|
||||||
|
|
||||||
# print(host)
|
# print(host)
|
||||||
# print(password)
|
# print(password)
|
||||||
@@ -403,5 +406,10 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# import_option_base_list(elastic)
|
# import_option_base_list(elastic)
|
||||||
|
|
||||||
import_option_ostan_shahr(elastic)
|
# import_option_ostan_shahr(elastic)
|
||||||
|
|
||||||
|
# elastic.backupIndexToZipfile("G:/Project2/111", "mn_sanad_temp", "mn_sanad")
|
||||||
|
# elastic.backupIndexToZipfile("G:/Project2/111", "mn_steps_temp", "mn_steps")
|
||||||
|
elastic.backupIndexToZipfile("G:/Project2/111", "gn_calendar", "gn_calendar")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user