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
7e4c7121
Commit
7e4c7121
authored
Sep 24, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'redis_reply' into 'master'
add See merge request
!490
parents
672f78f6
2b36bf79
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
35 deletions
+50
-35
reply_comment1.py
vest/reply_answer/reply_comment1.py
+10
-7
reply_comment2.py
vest/reply_answer/reply_comment2.py
+10
-7
reply_comment3.py
vest/reply_answer/reply_comment3.py
+10
-7
reply_comment5.py
vest/reply_answer/reply_comment5.py
+10
-7
reply_comment7.py
vest/reply_answer/reply_comment7.py
+10
-7
No files found.
vest/reply_answer/reply_comment1.py
View file @
7e4c7121
...
...
@@ -10,13 +10,16 @@ def reply_comment1():
redis_key1
=
"cybertron:set_reply_id:one"
redis_client
=
set_reply_to_redis
()
have_reply1
=
redis_client
.
get
(
redis_key1
)
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
if
have_reply1
==
None
:
pass
else
:
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
except
:
logging_exception
()
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
vest/reply_answer/reply_comment2.py
View file @
7e4c7121
...
...
@@ -10,13 +10,16 @@ def reply_comment2():
redis_key1
=
"cybertron:set_reply_id:two"
redis_client
=
set_reply_to_redis
()
have_reply1
=
redis_client
.
get
(
redis_key1
)
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
if
have_reply1
==
None
:
pass
else
:
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
except
:
logging_exception
()
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
vest/reply_answer/reply_comment3.py
View file @
7e4c7121
...
...
@@ -10,13 +10,16 @@ def reply_comment3():
redis_key1
=
"cybertron:set_reply_id:three"
redis_client
=
set_reply_to_redis
()
have_reply1
=
redis_client
.
get
(
redis_key1
)
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
if
have_reply1
==
None
:
pass
else
:
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
except
:
logging_exception
()
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
vest/reply_answer/reply_comment5.py
View file @
7e4c7121
...
...
@@ -10,13 +10,16 @@ def reply_comment5():
redis_key1
=
"cybertron:set_reply_id:five"
redis_client
=
set_reply_to_redis
()
have_reply1
=
redis_client
.
get
(
redis_key1
)
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
if
have_reply1
==
None
:
pass
else
:
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
except
:
logging_exception
()
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
vest/reply_answer/reply_comment7.py
View file @
7e4c7121
...
...
@@ -10,13 +10,16 @@ def reply_comment7():
redis_key1
=
"cybertron:set_reply_id:seven"
redis_client
=
set_reply_to_redis
()
have_reply1
=
redis_client
.
get
(
redis_key1
)
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
if
have_reply1
==
None
:
pass
else
:
result
=
json
.
loads
(
str
(
have_reply1
,
encoding
=
"utf-8"
))
if
result
:
for
item
in
result
:
majia_user_id
=
get_majia_reply
(
item
[
"majia_user_id"
])
cook
=
logins
(
majia_user_id
)
reply2
(
cook
,
item
[
"topic_id"
],
item
[
"answer"
],
item
[
"id"
])
redis_client
.
delete
(
redis_key1
)
except
:
logging_exception
()
logging
.
error
(
"catch exception,main:
%
s"
%
traceback
.
format_exc
())
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