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
Chengyang Zhong
crawler
Commits
be6cffba
Commit
be6cffba
authored
Aug 11, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e607e45e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
push_crawler_data_to_mysql.py
crawler_sys/scheduler/push_crawler_data_to_mysql.py
+1
-1
No files found.
crawler_sys/scheduler/push_crawler_data_to_mysql.py
View file @
be6cffba
...
...
@@ -57,7 +57,6 @@ def scan_es_to_mysql():
scan_res
=
scan
(
client
=
es_framework
,
query
=
search_query
,
index
=
"crawler-data-raw"
)
for
res
in
scan_res
:
if_exists
=
rds
.
sismember
(
"article_id_list"
,
res
[
"_id"
])
if_exists
=
None
tractate_id
=
None
if
not
if_exists
:
data
=
res
[
"_source"
]
...
...
@@ -90,6 +89,7 @@ def send_one_data_to_mysql(_id):
if
search_res
[
"hits"
][
"hits"
]:
res
=
search_res
[
"hits"
][
"hits"
][
0
]
if_exists
=
rds
.
sismember
(
"article_id_list"
,
res
[
"_id"
])
if_exists
=
None
tractate_id
=
None
if
not
if_exists
:
data
=
res
[
"_source"
]
...
...
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