
    ݫGi                         d Z ddlZddlZ	 ddlmZ ddddd	d
dddddddddddZdddddidddddidddddidddddidZddZd Z	y# e$ r	 ddlmZ Y Kw xY w)z3
Configuration management for Link Checker package
    N   )ConfigurationErrorz37.27.12.199axg_crm_new1Yyv1QT2JUMLyxt71cYLGaxg_crm_newT)hostuserpassworddbname
autocommitz$aecaa0fe-4673-436d-a798-1601cf593f64(c9f53cf2f4e28761654178dbe22fb9479b27f1c1)solr_api_keyproxy_api_tokenz/home/moses/scraperz"/home/moses/scripts/user_agents.jsz/opt/chromedriver)scraper_pathuser_agents_scriptchromedriver_pathz'http://127.0.0.1:8983/solr/check_status)axghouse	SolrRocks)urlauth)databaseapipathssolrr   z/root/scraperz/root/user_agents.js)	autochecklinkverificationmanualcheckstatustesttoolc                    t         j                         }|r[t        j                  j	                  |      r<	 t        |d      5 }t        j                  |      }|j                  |       ddd       | rG| t        v r?t        |    }|j                         D ]#  \  }}||v r||   j                  |       |||<   % |S # 1 sw Y   TxY w# t        $ r}t        d| d|       d}~ww xY w)a  
    Get configuration for the specified server type
    
    Args:
        server_type (str): Type of server (autocheck, linkverification, etc.)
        config_file (str): Path to custom config file
    
    Returns:
        dict: Configuration dictionary
    rNzFailed to load config file z: )DEFAULT_CONFIGcopyospathexistsopenjsonloadupdate	Exceptionr   SERVER_CONFIGSitems)	server_typeconfig_fileconfigfcustom_configeserver_configkeyvalues	            6/var/www/html/utilities/link_checker_package/config.py
get_configr7   F   s       "F rww~~k2	Wk3' -1 $		!m,- {n4&{3'--/ 	$JCf}s""5)#s		$ M- -  	W$'B;-rRSQT%UVV	Ws/   C	 'B=*C	 =CC	 		C(C##C(c                 V    | t         vr	i t         | <   t         |    j                  |       y)z
    Update configuration for a specific server type
    
    Args:
        server_type (str): Type of server
        updates (dict): Configuration updates
    N)r+   r)   )r-   updatess     r6   update_configr:   g   s)     .(&({#;&&w/    )NN)
__doc__r#   r'   
exceptionsr   ImportErrorr!   r+   r7   r:    r;   r6   <module>r@      s    
 .. * ?E
 .B0 9)#4 	1"F!4
 	+"8!4
 	1"F!4
 	1"F!4
->B0y  .-.s   A AA