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
adbb68a7
Commit
adbb68a7
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: clear cache when necessary
parent
e9d7673e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!123
REL: Release v0.6.0
,
!115
Use cached_get_entity_by
Pipeline
#36289
failed
2 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caoscrawler/crawl.py
+2
-1
2 additions, 1 deletion
src/caoscrawler/crawl.py
unittests/test_tool.py
+6
-1
6 additions, 1 deletion
unittests/test_tool.py
with
8 additions
and
2 deletions
src/caoscrawler/crawl.py
+
2
−
1
View file @
adbb68a7
...
...
@@ -38,7 +38,7 @@ import logging
import
os
import
sys
import
uuid
from
caosdb.cached
import
cached_get_entity_by
from
caosdb.cached
import
cached_get_entity_by
,
cache_clear
import
warnings
import
yaml
...
...
@@ -847,6 +847,7 @@ class Crawler(object):
logger
.
info
(
f
"
Going to insert
{
len
(
to_be_inserted
)
}
Entities and update
"
f
"
{
len
(
to_be_updated
)
}
Entities.
"
)
if
commit_changes
:
cache_clear
()
self
.
execute_parent_updates_in_list
(
to_be_updated
,
securityMode
=
self
.
securityMode
,
run_id
=
self
.
run_id
,
unique_names
=
unique_names
)
logger
.
info
(
f
"
Added parent RecordTypes where necessary.
"
)
...
...
This diff is collapsed.
Click to expand it.
unittests/test_tool.py
+
6
−
1
View file @
adbb68a7
...
...
@@ -46,7 +46,7 @@ from os.path import join, dirname, basename
import
yaml
import
caosdb
as
db
from
caosdb.apiutils
import
compare_entities
from
caosdb.cached
import
cache_clear
import
pytest
from
pytest
import
raises
...
...
@@ -76,6 +76,11 @@ def dircheckstr(*pathcomponents):
"
test_directories
"
,
"
examples_article
"
,
*
pathcomponents
))
@pytest.fixture
def
clear_cache
(
autouse
=
True
):
cache_clear
()
@pytest.fixture
def
crawler
():
crawler
=
Crawler
()
...
...
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