Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
physical
Commits
0e7de914
Commit
0e7de914
authored
Apr 23, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
2d9e0973
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
apps.py
majia/apps.py
+1
-0
auto_instant_click.py
majia/auto_instant_click.py
+1
-6
celery_task_router.py
physical/celery_task_router.py
+3
-3
No files found.
majia/apps.py
View file @
0e7de914
...
@@ -4,3 +4,4 @@ from django.apps import AppConfig
...
@@ -4,3 +4,4 @@ from django.apps import AppConfig
class
majiaConfig
(
AppConfig
):
class
majiaConfig
(
AppConfig
):
name
=
"majia"
name
=
"majia"
verbose_name
=
"马甲用户"
verbose_name
=
"马甲用户"
majia/auto_instant_click.py
View file @
0e7de914
...
@@ -6,9 +6,8 @@ import threading
...
@@ -6,9 +6,8 @@ import threading
import
traceback
import
traceback
import
logging
import
logging
from
celery
import
shared_task
from
celery
import
shared_task
from
django.conf
import
settings
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
from
majia
import
host
,
user
,
passwd
,
db
exec_count
=
0
exec_count
=
0
...
@@ -40,14 +39,12 @@ def auto_click(pk_list):
...
@@ -40,14 +39,12 @@ def auto_click(pk_list):
exec_count
+=
1
exec_count
+=
1
if
exec_count
==
1
:
if
exec_count
==
1
:
logging
.
info
(
"-----1-------"
)
# sleep_time = random.randint(300, 540)
# sleep_time = random.randint(300, 540)
sleep_time
=
30
sleep_time
=
30
timer
=
threading
.
Timer
(
sleep_time
,
fun_timer
)
timer
=
threading
.
Timer
(
sleep_time
,
fun_timer
)
timer
.
start
()
timer
.
start
()
if
exec_count
==
2
:
if
exec_count
==
2
:
logging
.
info
(
"-----2-------"
)
# sleep_time = random.randint(1000, 1900)
# sleep_time = random.randint(1000, 1900)
sleep_time
=
50
sleep_time
=
50
timer
=
threading
.
Timer
(
sleep_time
,
fun_timer
)
timer
=
threading
.
Timer
(
sleep_time
,
fun_timer
)
...
@@ -91,14 +88,12 @@ def auto_reply(pk_list):
...
@@ -91,14 +88,12 @@ def auto_reply(pk_list):
exec_count
+=
1
exec_count
+=
1
if
exec_count
==
1
:
if
exec_count
==
1
:
logging
.
info
(
"-----13-------"
)
sleep_time
=
random
.
randint
(
300
,
540
)
sleep_time
=
random
.
randint
(
300
,
540
)
sleep_time
=
30
sleep_time
=
30
timer
=
threading
.
Timer
(
sleep_time
,
fun_comment
)
timer
=
threading
.
Timer
(
sleep_time
,
fun_comment
)
timer
.
start
()
timer
.
start
()
if
exec_count
==
2
:
if
exec_count
==
2
:
logging
.
info
(
"-----14-------"
)
sleep_time
=
random
.
randint
(
1000
,
1900
)
sleep_time
=
random
.
randint
(
1000
,
1900
)
sleep_time
=
30
sleep_time
=
30
timer
=
threading
.
Timer
(
sleep_time
,
fun_comment
)
timer
=
threading
.
Timer
(
sleep_time
,
fun_comment
)
...
...
physical/celery_task_router.py
View file @
0e7de914
...
@@ -13,9 +13,9 @@ class CeleryTaskRouter(object):
...
@@ -13,9 +13,9 @@ class CeleryTaskRouter(object):
"majia-alpha"
:
[
"majia-alpha"
:
[
'majia.auto_instant_click.auto_click'
,
'majia.auto_instant_click.auto_click'
,
],
],
"majia-alpha"
:
[
#
"majia-alpha": [
'majia.auto_instant_click.auto_reply'
,
#
'majia.auto_instant_click.auto_reply',
],
#
],
}
}
# Map[TaskName, QueueName]
# Map[TaskName, QueueName]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment