Commit 0e7de914 authored by lixiaofang's avatar lixiaofang

add

parent 2d9e0973
......@@ -4,3 +4,4 @@ from django.apps import AppConfig
class majiaConfig(AppConfig):
name = "majia"
verbose_name = "马甲用户"
......@@ -6,9 +6,8 @@ import threading
import traceback
import logging
from celery import shared_task
from django.conf import settings
from majia import get_comments, get_cookies, click, time_conv, login, reply
from majia import get_comments, click, login, reply
from majia import host, user, passwd, db
exec_count = 0
......@@ -40,14 +39,12 @@ def auto_click(pk_list):
exec_count += 1
if exec_count == 1:
logging.info("-----1-------")
# sleep_time = random.randint(300, 540)
sleep_time = 30
timer = threading.Timer(sleep_time, fun_timer)
timer.start()
if exec_count == 2:
logging.info("-----2-------")
# sleep_time = random.randint(1000, 1900)
sleep_time = 50
timer = threading.Timer(sleep_time, fun_timer)
......@@ -91,14 +88,12 @@ def auto_reply(pk_list):
exec_count += 1
if exec_count == 1:
logging.info("-----13-------")
sleep_time = random.randint(300, 540)
sleep_time = 30
timer = threading.Timer(sleep_time, fun_comment)
timer.start()
if exec_count == 2:
logging.info("-----14-------")
sleep_time = random.randint(1000, 1900)
sleep_time = 30
timer = threading.Timer(sleep_time, fun_comment)
......
......@@ -13,9 +13,9 @@ class CeleryTaskRouter(object):
"majia-alpha": [
'majia.auto_instant_click.auto_click',
],
"majia-alpha": [
'majia.auto_instant_click.auto_reply',
],
# "majia-alpha": [
# 'majia.auto_instant_click.auto_reply',
# ],
}
# Map[TaskName, QueueName]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment