This commit is contained in:
hsafaei
2026-02-01 12:36:08 +03:30
parent ce960eaca3
commit 2229ecd6e2
2 changed files with 38 additions and 22 deletions
+27 -19
View File
@@ -294,17 +294,17 @@ def import_option_base_list(elastic):
"main_key": "qasection_before_info_commission",
"main_label": "پروند - عنوان کمیسیونها",
},
{"main_key": "rgsection_tsref", "main_label": "مقررات - مرجع تصویب ها"},
{"main_key": "qasection_tsref", "main_label": "قانون - مرجع تصویب ها"},
{"main_key": "rgsection_tsref", "main_label": "شناسنامه مقررات - مرجع تصویب ها"},
{"main_key": "qasection_tsref", "main_label": "شناسنامه قانون - مرجع تصویب ها"},
{
"group_key": "majles_it_base",
"main_key": "qasection_qanon_etebar",
"main_label": "وضعیت اعتبار قانون",
"main_label": "قانون - وضعیت اعتبار",
},
{
"group_key": "majles_it_base",
"main_key": "qasection_state_etebar",
"main_label": "وضعیت اعتبار جزء قانون",
"main_label": "قانون - وضعیت اعتبار جزء",
},
{"main_key": "qasection_doc_tags", "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)
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)
def import_option_others(elastic, index_name_o="gn_option"):
###-------------------------------------------
res = get_organs()
@@ -607,7 +594,7 @@ if __name__ == "__main__":
titles.append(title)
eid = "mb_organ_1"
group_key = "عناوین انتخابی برنامه"
group_key = "عناوین انتخابی فرمها"
main_key = "organ_defualt"
main_label = "سازمانهای پیش فرض قانون جدید"
@@ -621,3 +608,24 @@ if __name__ == "__main__":
"titles": titles,
}
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
View File
@@ -28,8 +28,11 @@ load_dotenv(dotenv_path="config.env")
# host = os.getenv("HOST_160_LOCAL")
# password = os.getenv("HOST_160_PASS")
host = os.getenv("HOST_60")
password = os.getenv("HOST_60_PASS")
# host = os.getenv("HOST_60")
# password = os.getenv("HOST_60_PASS")
host = os.getenv("HOST_133")
password = os.getenv("HOST_133_PASS")
# print(host)
# print(password)
@@ -403,5 +406,10 @@ if __name__ == "__main__":
# 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")