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
钟尚武
physical
Commits
2724b0b8
Commit
2724b0b8
authored
Nov 24, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
30688c82
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
trans2es_data2es_parallel.py
trans2es/management/commands/trans2es_data2es_parallel.py
+2
-6
No files found.
trans2es/management/commands/trans2es_data2es_parallel.py
View file @
2724b0b8
...
...
@@ -50,7 +50,7 @@ class Command(BaseCommand):
from
optparse
import
make_option
option_list
=
BaseCommand
.
option_list
+
(
make_option
(
'-t'
,
'--type'
,
dest
=
'type
_list
'
,
action
=
'append'
,
help
=
'type name to dump data to elasticsearch'
,
metavar
=
'TYPE'
,
default
=
''
),
make_option
(
'-t'
,
'--type'
,
dest
=
'type'
,
action
=
'append'
,
help
=
'type name to dump data to elasticsearch'
,
metavar
=
'TYPE'
,
default
=
''
),
make_option
(
'-i'
,
'--index-prefix'
,
dest
=
'index_prefix'
,
help
=
'index name to dump data to elasticsearch'
,
metavar
=
'INDEX_PREFIX'
),
make_option
(
'-p'
,
'--parallel'
,
dest
=
'parallel'
,
help
=
'parallel process count'
,
metavar
=
'PARALLEL'
),
make_option
(
'-s'
,
'--pks'
,
dest
=
'pks'
,
help
=
'specify sync pks, comma separated'
,
metavar
=
'PKS'
,
default
=
''
),
...
...
@@ -60,14 +60,10 @@ class Command(BaseCommand):
def
handle
(
self
,
*
args
,
**
options
):
try
:
option_type_list
=
list
()
if
len
(
self
.
option_list
.
type_list
)
>
0
:
option_type_list
=
self
.
option_list
.
type_list
.
split
(
","
)
type_name_list
=
get_type_info_map
()
.
keys
()
for
type_name
in
type_name_list
:
if
type_name
not
in
option_type_list
:
if
len
(
self
.
option_list
.
type
)
and
type_name
!=
self
.
option_list
.
type
:
logging
.
warning
(
"type_name:
%
s can not need to execute!"
%
type_name
)
continue
...
...
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