Commit 111a9dd1 authored by lixiaofang's avatar lixiaofang

add

parent cc5d5666
from .get_session import *
\ No newline at end of file
# coding=utf-8
from __future__ import unicode_literals, print_function, absolute_import
from django.apps import AppConfig
class majiaConfig(AppConfig):
name = "majia"
verbose_name = "马甲用户"
class MaJiaApp(AppConfig):
name = 'majia'
label = ''
......@@ -7,13 +7,11 @@ import traceback
import logging
from celery import shared_task
from django.conf import settings
from majia import get_comments, click, login, reply
from majia import host, user, passwd, db
from majia.get_session import get_comments, click, login, reply
from majia.get_session import host, user, passwd, db
exec_count = 0
@shared_task
def auto_click(pk_list):
exec_count = 0
try:
......@@ -60,7 +58,6 @@ def auto_click(pk_list):
logging.error("catch exception,main:%s" % traceback.format_exc())
@shared_task
def auto_reply(pk_list):
exec_count = 0
try:
......@@ -106,3 +103,10 @@ def auto_reply(pk_list):
except:
logging.error("catch exception,main:%s" % traceback.format_exc())
@shared_task
def auto_majia_effect(pk_list):
auto_click(pk_list)
auto_reply(pk_list)
\ No newline at end of file
......@@ -11,11 +11,8 @@ class CeleryTaskRouter(object):
'injection.data_sync.tasks.write_to_es',
],
"majia-alpha": [
'majia.apps.majiaConfig.auto_instant_click.auto_click',
'majia.auto_instant_click.auto_majia_effect',
],
# "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