Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
crawler
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
backend
crawler
Commits
8ebe168b
Commit
8ebe168b
authored
4 years ago
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a28147c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
target_releaser_add.py
write_data_into_es/target_releaser_add.py
+1
-2
No files found.
write_data_into_es/target_releaser_add.py
View file @
8ebe168b
...
@@ -229,7 +229,7 @@ def write_to_es(file, push_to_redis=True, update=True, key_releaser=False, updat
...
@@ -229,7 +229,7 @@ def write_to_es(file, push_to_redis=True, update=True, key_releaser=False, updat
bulk_all_body
+=
bulk_one_body
bulk_all_body
+=
bulk_one_body
count
=
count
+
1
count
=
count
+
1
if
count
%
500
==
0
:
if
count
%
500
==
0
:
eror_dic
=
es
.
bulk
(
index
=
'target_releasers'
,
doc_type
=
'doc'
,
eror_dic
=
es
.
bulk
(
index
=
'target_releasers'
,
body
=
bulk_all_body
)
body
=
bulk_all_body
)
bulk_all_body
=
''
bulk_all_body
=
''
if
eror_dic
[
'errors'
]
is
True
:
if
eror_dic
[
'errors'
]
is
True
:
...
@@ -237,7 +237,6 @@ def write_to_es(file, push_to_redis=True, update=True, key_releaser=False, updat
...
@@ -237,7 +237,6 @@ def write_to_es(file, push_to_redis=True, update=True, key_releaser=False, updat
if
bulk_all_body
!=
''
:
if
bulk_all_body
!=
''
:
eror_dic
=
es
.
bulk
(
body
=
bulk_all_body
,
eror_dic
=
es
.
bulk
(
body
=
bulk_all_body
,
index
=
'target_releasers'
,
index
=
'target_releasers'
,
doc_type
=
'doc'
,
)
)
if
eror_dic
[
'errors'
]
is
True
:
if
eror_dic
[
'errors'
]
is
True
:
print
(
eror_dic
)
print
(
eror_dic
)
...
...
This diff is collapsed.
Click to expand it.
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