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
e60c514f
Commit
e60c514f
authored
Jun 12, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tips' into 'master'
新增所以 See merge request
!15
parents
f0c8493a
535a06be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
0 deletions
+83
-0
type_info.py
trans2es/type_info.py
+83
-0
No files found.
trans2es/type_info.py
View file @
e60c514f
...
@@ -353,6 +353,89 @@ def get_type_info_map():
...
@@ -353,6 +353,89 @@ def get_type_info_map():
bulk_insert_chunk_size
=
100
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'doctor_tips'
,
# doctor
model
=
doctor
.
Doctor
,
query_deferred
=
lambda
:
doctor
.
Doctor
.
objects
.
all
()
.
filter
(
doctor_type
=
DOCTOR_TYPE
.
DOCTOR
)
.
query
,
get_data_func
=
DoctorTransfer
.
get_doctor_suggest_data_list
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'hospital_tips'
,
# hospital
model
=
doctor
.
Hospital
,
# query_deferred=lambda: doctor.Doctor.objects.all().filter(doctor_type=DOCTOR_TYPE.OFFICER).query,
query_deferred
=
lambda
:
doctor
.
Hospital
.
objects
.
all
()
.
query
,
get_data_func
=
HospitalTransfer
.
get_hospital_suggest_data_list
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'itemwiki_tips'
,
# itemwiki
model
=
itemwiki
.
ItemWiki
,
query_deferred
=
lambda
:
itemwiki
.
ItemWiki
.
objects
.
all
()
.
query
,
get_data_func
=
ItemWikiTransfer
.
get_itemwiki_suggest_data_list
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'collectwiki_tips'
,
# collectwiki
model
=
collectwiki
.
CollectWiki
,
query_deferred
=
lambda
:
collectwiki
.
CollectWiki
.
objects
.
all
()
.
query
,
get_data_func
=
CollectWikiTransfer
.
get_collectwiki_suggest_data_list
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'brandwiki_tips'
,
# brandwiki
model
=
brandwiki
.
BrandWiki
,
query_deferred
=
lambda
:
brandwiki
.
BrandWiki
.
objects
.
all
()
.
query
,
get_data_func
=
BrandWikiTransfer
.
get_brandwiki_suggest_data_list
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'productwiki_tips'
,
# productwiki
model
=
productwiki
.
ProductWiki
,
query_deferred
=
lambda
:
productwiki
.
ProductWiki
.
objects
.
all
()
.
query
,
get_data_func
=
ProduceWikiTransfer
.
get_productwiki_suggest_data_list
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'tag_tips'
,
# tag
model
=
tag
.
Tag
,
query_deferred
=
lambda
:
tag
.
Tag
.
objects
.
all
()
.
filter
(
tag_type__in
=
[
TAG_TYPE
.
BODY_PART
,
TAG_TYPE
.
BODY_PART_SUB_ITEM
,
TAG_TYPE
.
ITEM_WIKI
])
.
query
,
get_data_func
=
TagTransfer
.
get_tag_suggest_data_list
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_period
=
2
,
),
TypeInfo
(
name
=
'suggest-v1'
,
type
=
'wordrel_tips'
,
# tag
model
=
wordresemble
.
WordRel
,
query_deferred
=
lambda
:
wordresemble
.
WordRel
.
objects
.
filter
(
category__in
=
[
0
,
1
,
2
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
])
.
query
,
get_data_func
=
WordResemble
.
get_resemble_list
,
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