示例#1
0
def log_parser(date):
    from model.zsite_rank import zsite_rank_rebase, zsite_rank_update
    from model.zsite_show import zsite_show_update
    from config import NGINX_LOGROTATE_DIR
    from os.path import join
    filepath = join(
        NGINX_LOGROTATE_DIR,
        '%s_zsite.access_log-%s.lzma'%(SITE_DOMAIN.replace('.', '_'), date)
    )
    #print filepath
    pipe = subprocess.Popen(['lzcat', filepath], stdout=subprocess.PIPE, ).stdout
    days = date_to_days(date)
    log2zsite_uv_daliy(days, pipe)
    pipe.close()
    zsite_rank_update(days)
    zsite_rank_rebase()
    zsite_show_update()
示例#2
0
# -*- coding: utf-8 -*-
import _url_istarsea
import tornado.wsgi
from config import SITE_DOMAIN
from zweb.urlmap import handlers
from config import SITE_URL

application = tornado.wsgi.WSGIApplication(
    login_url='/auth/login' ,
    xsrf_cookies=True,
)

RE_SITE_DOMAIN = SITE_DOMAIN.replace('.', r"\.")


import _urlmap_istarsea.istarsea
import _urlmap_istarsea.i
import _urlmap_istarsea.j

application.add_handlers(
    '.*',
    handlers(
        _urlmap_istarsea.istarsea,
        _urlmap_istarsea.i,
        _urlmap_istarsea.j
    )
)

示例#3
0
# -*- coding: utf-8 -*-
import _url_istarsea
import tornado.wsgi
from config import SITE_DOMAIN
from zweb.urlmap import handlers
from config import SITE_URL

application = tornado.wsgi.WSGIApplication(
    login_url='/auth/login',
    xsrf_cookies=True,
)

RE_SITE_DOMAIN = SITE_DOMAIN.replace('.', r"\.")

import _urlmap_istarsea.istarsea
import _urlmap_istarsea.i
import _urlmap_istarsea.j

application.add_handlers(
    '.*',
    handlers(_urlmap_istarsea.istarsea, _urlmap_istarsea.i,
             _urlmap_istarsea.j))