Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mentha
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
1
Merge Requests
1
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
rank
mentha
Commits
915991fc
Commit
915991fc
authored
Nov 18, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
28a43206
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
transfer.py
data_sync/answer/transfer.py
+3
-2
No files found.
data_sync/answer/transfer.py
View file @
915991fc
...
...
@@ -14,6 +14,7 @@ import time
import
datetime
from
django.conf
import
settings
import
redis
rpc
=
get_rpc_invoker
()
...
...
@@ -83,7 +84,7 @@ def get_answers(pks):
item
[
"content_star_first_keyword"
]
=
get_content_star_first_keyword
(
id
=
answer
.
id
,
content_type
=
"answer"
)
# item["title_keyword"] = get_content_title_keywords(id=answer.id, content_type="answer")
# item["has_service"] = has_service(tag_ids, content_keyword)
item
[
"has_service"
]
=
False
item
[
"has_service"
]
=
False
item
[
'operators_add_tags'
]
=
get_tag_v3_operators_tags
(
content_id
=
answer
.
id
,
content_type
=
"answer"
)
item
[
'anecdote_tags'
]
=
get_tag_v3_anecdote_tags
(
content_id
=
answer
.
id
,
content_type
=
"answer"
)
item
[
'anecdote_tag_ids'
]
=
get_tag_v3_anecdote_tag_ids
(
content_id
=
answer
.
id
,
content_type
=
"answer"
)
...
...
@@ -171,7 +172,7 @@ def get_answers(pks):
item
[
"is_need_guarantee"
]
=
True
# else: # 7天以上强制不保量
# item["is_need_guarantee"] = False
item
[
"has_video"
]
=
Answer
.
has_video
(
answer
)
item
[
"has_video"
]
=
Answer
.
has_video
(
answer
)
data
.
append
(
item
)
except
(
Answer
.
DoesNotExist
,
Question
.
DoesNotExist
):
pass
...
...
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