Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Crawler
Commits
c7c65d0d
Commit
c7c65d0d
authored
2 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
STY: autopep'd
parent
b0eed6d9
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!53
Release 0.1
,
!25
F macros
Pipeline
#28925
passed
2 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caoscrawler/crawl.py
+5
-3
5 additions, 3 deletions
src/caoscrawler/crawl.py
with
5 additions
and
3 deletions
src/caoscrawler/crawl.py
+
5
−
3
View file @
c7c65d0d
...
...
@@ -239,7 +239,8 @@ class Crawler(object):
elif
len
(
crawler_definitions
)
==
2
:
crawler_definition
=
crawler_definitions
[
1
]
else
:
raise
RuntimeError
(
"
Crawler definition must not contain more than two documents.
"
)
raise
RuntimeError
(
"
Crawler definition must not contain more than two documents.
"
)
# TODO: at this point this function can already load the cfood schema extensions
# from the crawler definition and add them to the yaml schema that will be
...
...
@@ -443,7 +444,8 @@ class Crawler(object):
items
=
[
items
]
self
.
run_id
=
uuid
.
uuid1
()
local_converters
=
Crawler
.
initialize_converters
(
crawler_definition
,
converter_registry
)
local_converters
=
Crawler
.
initialize_converters
(
crawler_definition
,
converter_registry
)
# This recursive crawling procedure generates the update list:
self
.
target_data
:
List
[
db
.
Record
]
=
[]
self
.
_crawl
(
items
,
...
...
@@ -525,7 +527,7 @@ class Crawler(object):
if
(
isinstance
(
p
.
value
,
list
)):
for
el
in
p
.
value
:
if
(
isinstance
(
el
,
db
.
Entity
)
and
el
.
id
is
None
and
self
.
get_identified_record_from_local_cache
(
el
)
is
None
):
and
self
.
get_identified_record_from_local_cache
(
el
)
is
None
):
return
False
if
(
isinstance
(
p
.
value
,
db
.
Entity
)
and
p
.
value
.
id
is
None
and
self
.
get_identified_record_from_local_cache
(
p
.
value
)
is
None
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment