관리-도구
편집 파일: pulpcore.pyc
� u��ec @ sS d d l m Z m Z d d l m Z d d l m Z d e e f d � � YZ d S( i����( t Plugint IndependentPlugin( t quote( t matcht PulpCorec B sD e Z d Z d Z d Z d Z d g Z d � Z d � Z d � Z RS( s Pulp-3 aka pulpcoret pulpcores pulpcore-managers /etc/pulp/settings.pys task-dayss days of tasks historyt fasti c C s� t } d | _ d | _ d | _ d | _ d | _ d d � } y=x6t d � j � j � D]} | s[ | d d k r~ q[ n | j d � r� t } q[ n | r� t d | � r� | | � | _ n | r� t d | � r� | | � | _ n | rt d | � r| | � | _ n | r)d | k r)t } n | j d � rP| | d d �| _ n | j d � r[ | | d d �| _ q[ q[ WWn t k r�n Xi | j d 6| _ d S( Nt localhosti8 t s /var/lib/pulp/assetss /var/lib/pulp/media/uploadt :c S sr | j | � d j � j d � } | j d � r@ | j d � s^ | j d � rn | j d � rn | d d !} n | S( Ni t ,t "s 'i����( t splitt lstript rstript startswitht endswith( t linet sept val( ( s8 /usr/lib/python2.7/site-packages/sos/plugins/pulpcore.pyt separate_value% s "s /etc/pulp/settings.pyi t #t DATABASESs \s+'HOST'\s*:\s+\S+s \s+'PORT'\s*:\s+\S+s \s+'PASSWORD'\s*:\s+\S+t }s STATIC_ROOT = R t =s CHUNKED_UPLOAD_DIR = t PGPASSWORD( t Falset dbhostt dbportt dbpasswdt staticroott uploaddirt opent readt splitlinesR t TrueR t IOErrort env( t selft databases_scopeR R ( ( s8 /usr/lib/python2.7/site-packages/sos/plugins/pulpcore.pyt parse_settings_config s: c C s' | j � | j d � | j d d i d d 6d d �| j d d d �i d d 6d d 6d d 6} | j d d | �x+ | j | j g D] } | j d | � q� W| j d � } xk d d d d d d g D]Q } d | | f } d | j | j t | � f } | j | d | j d | �q� Wd S( Ns /etc/pulp/settings.pys# rq info -u redis://localhost:6379/8R% s en_US.UTF-8t LC_ALLt suggest_filenamet rq_infos. curl -ks https://localhost/pulp/api/v3/status/t pulp_statust PULP_SETTINGSs pulpcore.app.settingst DJANGO_SETTINGS_MODULEs dynaconf lists ls -l %ss task-dayst core_taskt core_taskgroupt core_reservedresourcerecordt core_taskreservedresourcerecordt core_groupprogressreportt core_progressreports` select * from %s where pulp_last_updated > NOW() - interval '%s days' order by pulp_last_updateds* psql -h %s -p %s -U pulp -d pulpcore -c %s( R( t add_copy_spect add_cmd_outputR R t get_optionR R R R% ( R&