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
alpha
physical
Commits
78ced253
Commit
78ced253
authored
5 years ago
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix key
parent
0a15553d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
auto_request.py
vest/request/auto_request.py
+6
-5
No files found.
vest/request/auto_request.py
View file @
78ced253
...
@@ -116,7 +116,7 @@ def logins(user_id):
...
@@ -116,7 +116,7 @@ def logins(user_id):
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
click
(
cookies_get
,
id
):
def
click
(
cookies_get
,
id
):
click_key
=
'click topic_id:
%
s, cookies_get:
%
s'
%
(
cookies_get
,
id
)
click_key
=
'click topic_id:
%
s, cookies_get:
%
s'
%
(
str
(
cookies_get
),
str
(
id
)
)
cache_count
=
click_cache
.
get
(
click_key
)
cache_count
=
click_cache
.
get
(
click_key
)
if
cache_count
:
if
cache_count
:
return
return
...
@@ -158,7 +158,7 @@ def click(cookies_get, id):
...
@@ -158,7 +158,7 @@ def click(cookies_get, id):
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
reply
(
cookies_get
,
id
,
content
):
def
reply
(
cookies_get
,
id
,
content
):
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
id
,
cookies_get
,
content
)
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
)
)
cache_count
=
reply_cache
.
get
(
reply_key
)
cache_count
=
reply_cache
.
get
(
reply_key
)
if
cache_count
:
if
cache_count
:
return
return
...
@@ -289,7 +289,7 @@ def get_comments():
...
@@ -289,7 +289,7 @@ def get_comments():
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
follow
(
cookies_get
,
id
):
def
follow
(
cookies_get
,
id
):
follow_key
=
'click user_id:
%
s, cookies_get:
%
s'
%
(
id
,
cookies_get
)
follow_key
=
'click user_id:
%
s, cookies_get:
%
s'
%
(
str
(
id
),
str
(
cookies_get
)
)
cache_count
=
follow_cache
.
get
(
follow_key
)
cache_count
=
follow_cache
.
get
(
follow_key
)
if
cache_count
:
if
cache_count
:
return
return
...
@@ -462,7 +462,8 @@ def set_reply_to_redis():
...
@@ -462,7 +462,8 @@ def set_reply_to_redis():
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
reply2
(
cookies_get
,
id
,
content
,
replied_id
):
def
reply2
(
cookies_get
,
id
,
content
,
replied_id
):
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
id
,
cookies_get
,
content
)
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s, replied_id:
%
s'
%
\
(
str
(
id
),
str
(
cookies_get
),
str
(
content
),
str
(
replied_id
))
cache_count
=
reply_cache
.
get
(
reply_key
)
cache_count
=
reply_cache
.
get
(
reply_key
)
if
cache_count
:
if
cache_count
:
return
return
...
@@ -490,7 +491,7 @@ def reply2(cookies_get, id, content, replied_id):
...
@@ -490,7 +491,7 @@ def reply2(cookies_get, id, content, replied_id):
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
pictorial_reply
(
cookies_get
,
id
,
content
):
def
pictorial_reply
(
cookies_get
,
id
,
content
):
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
id
,
cookies_get
,
content
)
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
)
)
cache_count
=
reply_cache
.
get
(
reply_key
)
cache_count
=
reply_cache
.
get
(
reply_key
)
if
cache_count
:
if
cache_count
:
return
return
...
...
This diff is collapsed.
Click to expand it.
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