Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
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
rank
search_tips
Commits
53c532e7
Commit
53c532e7
authored
Jan 25, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
00611fde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
4 deletions
+44
-4
type_info.py
trans2es/type_info.py
+44
-4
No files found.
trans2es/type_info.py
View file @
53c532e7
...
...
@@ -336,8 +336,8 @@ def tips_attr_sync_to_redis_type_info_map():
TypeInfo
(
name
=
'suggest'
,
type
=
'doctor_results_num'
,
# doctor结果数
model
=
tag
.
Tag
,
query_deferred
=
lambda
:
tag
.
Tag
.
objects
.
all
(
)
.
query
,
model
=
doctor
.
Doctor
,
query_deferred
=
lambda
:
doctor
.
Doctor
.
objects
.
all
()
.
filter
(
tag_type__in
=
[
TAG_TYPE
.
BODY_PART
,
TAG_TYPE
.
BODY_PART_SUB_ITEM
,
TAG_TYPE
.
ITEM_WIKI
]
)
.
query
,
get_data_func
=
DoctorTransfer
.
get_doctor_data_name_mapping_results_to_redis
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
...
...
@@ -346,12 +346,52 @@ def tips_attr_sync_to_redis_type_info_map():
TypeInfo
(
name
=
'suggest'
,
type
=
'tag_results_num'
,
# tag结果数
model
=
doctor
.
Doctor
,
query_deferred
=
lambda
:
doctor
.
Doctor
.
objects
.
all
()
.
query
,
model
=
tag
.
Tag
,
query_deferred
=
lambda
:
tag
.
Tag
.
objects
.
all
()
.
query
,
get_data_func
=
TagTransfer
.
get_tag_data_name_mapping_results_to_redis
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest'
,
type
=
'itemwiki_results_num'
,
# itemwiki
model
=
itemwiki
.
ItemWiki
,
query_deferred
=
lambda
:
itemwiki
.
ItemWiki
.
objects
.
all
()
.
query
,
get_data_func
=
ItemWikiTransfer
.
get_wiki_data_name_mapping_results_to_redis
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest'
,
type
=
'collectwiki_results_num'
,
# collectwiki
model
=
collectwiki
.
CollectWiki
,
query_deferred
=
lambda
:
collectwiki
.
CollectWiki
.
objects
.
all
()
.
query
,
get_data_func
=
ItemWikiTransfer
.
get_wiki_data_name_mapping_results_to_redis
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest'
,
type
=
'brandwiki_results_num'
,
# brandwiki
model
=
brandwiki
.
BrandWiki
,
query_deferred
=
lambda
:
brandwiki
.
BrandWiki
.
objects
.
all
()
.
query
,
get_data_func
=
ItemWikiTransfer
.
get_wiki_data_name_mapping_results_to_redis
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest'
,
type
=
'productwiki_results_num'
,
# productwiki
model
=
productwiki
.
ProductWiki
,
query_deferred
=
lambda
:
productwiki
.
ProductWiki
.
objects
.
all
()
.
query
,
get_data_func
=
ItemWikiTransfer
.
get_wiki_data_name_mapping_results_to_redis
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
)
]
...
...
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