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
18ef21f1
Commit
18ef21f1
authored
Nov 02, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wsy3' into 'master'
add redis inrc See merge request
!576
parents
ab4d0a9b
5ed24fbc
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 @
18ef21f1
...
@@ -118,7 +118,7 @@ def logins(user_id):
...
@@ -118,7 +118,7 @@ def logins(user_id):
def
click
(
cookies_get
,
id
):
def
click
(
cookies_get
,
id
):
try
:
try
:
click_key
=
'click topic_id:
%
s, cookies_get:
%
s'
%
(
str
(
cookies_get
),
str
(
id
))
click_key
=
'click topic_id:
%
s, cookies_get:
%
s'
%
(
str
(
cookies_get
),
str
(
id
))
cache_count
=
click_cache
.
in
rc
(
click_key
,
1
)
cache_count
=
click_cache
.
in
cr
(
click_key
,
1
)
click_cache
.
expire
(
click_key
,
settings
.
CACHE_SECONDS
)
click_cache
.
expire
(
click_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
if
cache_count
>
1
:
return
return
...
@@ -161,7 +161,7 @@ def click(cookies_get, id):
...
@@ -161,7 +161,7 @@ def click(cookies_get, id):
def
reply
(
cookies_get
,
id
,
content
):
def
reply
(
cookies_get
,
id
,
content
):
try
:
try
:
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
))
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
))
cache_count
=
click_cache
.
in
rc
(
reply_key
,
1
)
cache_count
=
click_cache
.
in
cr
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
if
cache_count
>
1
:
return
return
...
@@ -294,7 +294,7 @@ def get_comments():
...
@@ -294,7 +294,7 @@ def get_comments():
def
follow
(
cookies_get
,
id
):
def
follow
(
cookies_get
,
id
):
try
:
try
:
follow_key
=
'click user_id:
%
s, cookies_get:
%
s'
%
(
str
(
id
),
str
(
cookies_get
))
follow_key
=
'click user_id:
%
s, cookies_get:
%
s'
%
(
str
(
id
),
str
(
cookies_get
))
cache_count
=
click_cache
.
in
rc
(
follow_key
,
1
)
cache_count
=
click_cache
.
in
cr
(
follow_key
,
1
)
follow_cache
.
expire
(
follow_key
,
settings
.
CACHE_SECONDS
)
follow_cache
.
expire
(
follow_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
if
cache_count
>
1
:
return
return
...
@@ -470,7 +470,7 @@ def reply2(cookies_get, id, content, replied_id):
...
@@ -470,7 +470,7 @@ def reply2(cookies_get, id, content, replied_id):
try
:
try
:
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s, replied_id:
%
s'
%
\
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s, replied_id:
%
s'
%
\
(
str
(
id
),
str
(
cookies_get
),
str
(
content
),
str
(
replied_id
))
(
str
(
id
),
str
(
cookies_get
),
str
(
content
),
str
(
replied_id
))
cache_count
=
click_cache
.
in
rc
(
reply_key
,
1
)
cache_count
=
click_cache
.
in
cr
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
if
cache_count
>
1
:
return
return
...
@@ -500,7 +500,7 @@ def reply2(cookies_get, id, content, replied_id):
...
@@ -500,7 +500,7 @@ def reply2(cookies_get, id, content, replied_id):
def
pictorial_reply
(
cookies_get
,
id
,
content
):
def
pictorial_reply
(
cookies_get
,
id
,
content
):
try
:
try
:
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
))
reply_key
=
'click topic_id:
%
s, cookies_get:
%
s, content:
%
s'
%
(
str
(
id
),
str
(
cookies_get
),
str
(
content
))
cache_count
=
click_cache
.
in
rc
(
reply_key
,
1
)
cache_count
=
click_cache
.
in
cr
(
reply_key
,
1
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
reply_cache
.
expire
(
reply_key
,
settings
.
CACHE_SECONDS
)
if
cache_count
>
1
:
if
cache_count
>
1
:
return
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