예제 #1
0
# -*- coding:utf-8 -*-
'''创建任务'''
import json
import random
import pickle
from handle_data import celery_app

from raven import Client

# from handle_data.rpyc_conn import rpycSer
from handle_data.save_to_mysql import Save_to_sql

import recorder
logger = recorder.get_log().config_log('./logs/response.log')

cli = Client(
    'https://*****:*****@sentry.cicjust.com//5'
)

# 建立redis连接池
import redis
from handle_data.celery_config import *
import hashlib
import re

redis_pool = redis.ConnectionPool(host=REDIS_HOST,
                                  port=REDIS_PORT,
                                  decode_responses=True)
r = redis.Redis(connection_pool=redis_pool)

# 建立rpyc连接
예제 #2
0
import mitmproxy.log
import mitmproxy.tcp
import mitmproxy.websocket
import mitmproxy.proxy.protocol
import pickle
import time
import uuid
from handle_data.main import handle_data

##############################
from handle_data.tasks import handel_parameter, filter_step
import random

import recorder

logger = recorder.get_log().config_log('./logs/request.log')

import redis
from handle_data.celery_config import *

redis_pool = redis.ConnectionPool(host=REDIS_HOST,
                                  port=REDIS_PORT,
                                  decode_responses=True)
r = redis.Redis(connection_pool=redis_pool)

from handle_data.save_to_mysql import Save_to_sql
import hashlib
##############################

filter_info = {'http_connect': ['sh.gov.cn']}