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
a0be5fa3
Commit
a0be5fa3
authored
Nov 04, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wsy3' into 'test'
fix key See merge request
alpha/physical!580
parents
5f04fc07
260d99f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
auto_request.py
vest/request/auto_request.py
+5
-5
No files found.
vest/request/auto_request.py
View file @
a0be5fa3
...
...
@@ -160,7 +160,7 @@ def click(cookies_get, id):
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
reply
(
cookies_get
,
id
,
content
):
try
:
reply_key
=
'
click
topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
))
reply_key
=
'
reply
topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
))
cache_count
=
click_cache
.
incr
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
...
...
@@ -293,8 +293,8 @@ def get_comments():
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
follow
(
cookies_get
,
id
):
try
:
follow_key
=
'
click
user_id:
%
s, cookies_get:
%
s'
%
(
str
(
id
),
str
(
cookies_get
))
cache_count
=
click
_cache
.
incr
(
follow_key
,
1
)
follow_key
=
'
follow
user_id:
%
s, cookies_get:
%
s'
%
(
str
(
id
),
str
(
cookies_get
))
cache_count
=
follow
_cache
.
incr
(
follow_key
,
1
)
follow_cache
.
expire
(
follow_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
return
...
...
@@ -478,9 +478,9 @@ def set_reply_to_redis():
@shared_task
(
retry_kwargs
=
{
'max_retries'
:
0
})
def
reply2
(
cookies_get
,
id
,
content
,
replied_id
):
try
:
reply_key
=
'
click
topic_id:
%
s, cookies_get:
%
s, content:
%
s, replied_id:
%
s'
%
\
reply_key
=
'
reply2
topic_id:
%
s, cookies_get:
%
s, content:
%
s, replied_id:
%
s'
%
\
(
str
(
id
),
str
(
cookies_get
),
str
(
content
),
str
(
replied_id
))
cache_count
=
click
_cache
.
incr
(
reply_key
,
1
)
cache_count
=
reply
_cache
.
incr
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
return
...
...
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