Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-archiver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Platform
Development
swh-archiver
Commits
61a5f472
Commit
61a5f472
authored
8 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
Refactor: Align source/destination configuration property names
parent
6500024c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/archiver/director.py
+3
-3
3 additions, 3 deletions
swh/archiver/director.py
swh/archiver/worker.py
+3
-3
3 additions, 3 deletions
swh/archiver/worker.py
with
6 additions
and
6 deletions
swh/archiver/director.py
+
3
−
3
View file @
61a5f472
...
...
@@ -166,7 +166,7 @@ class ArchiverStdinToBackendDirector(ArchiverDirectorBase):
"""
ADDITIONAL_CONFIG
=
{
'
destination
_host
'
:
(
'
str
'
,
'
azure
'
),
'
destination
'
:
(
'
str
'
,
'
azure
'
),
'
force_copy
'
:
(
'
bool
'
,
False
),
}
...
...
@@ -176,7 +176,7 @@ class ArchiverStdinToBackendDirector(ArchiverDirectorBase):
def
__init__
(
self
):
super
().
__init__
()
self
.
destination
_host
=
self
.
config
[
'
destination
_host
'
]
self
.
destination
=
self
.
config
[
'
destination
'
]
self
.
force_copy
=
self
.
config
[
'
force_copy
'
]
def
get_contents_to_archive
(
self
):
...
...
@@ -202,7 +202,7 @@ class ArchiverStdinToBackendDirector(ArchiverDirectorBase):
content_ids
=
list
(
self
.
archiver_storage
.
content_archive_get_missing
(
content_ids
=
content_ids
,
backend_name
=
self
.
destination
_host
))
backend_name
=
self
.
destination
))
if
not
content_ids
:
continue
...
...
This diff is collapsed.
Click to expand it.
swh/archiver/worker.py
+
3
−
3
View file @
61a5f472
...
...
@@ -39,7 +39,7 @@ class BaseArchiveWorker(config.SWHConfig, metaclass=abc.ABCMeta):
"""
DEFAULT_CONFIG
=
{
'
dbconn
'
:
(
'
str
'
,
'
dbname=softwareheritage-archiver-dev
'
),
'
source
'
:
'
uffizi
'
,
'
source
'
:
(
'
str
'
,
'
uffizi
'
)
,
'
storages
'
:
(
'
list[dict]
'
,
[
{
'
host
'
:
'
uffizi
'
,
...
...
@@ -391,7 +391,7 @@ class ArchiverToBackendWorker(BaseArchiveWorker):
"""
super
().
__init__
(
batch
)
self
.
destination
_host
=
self
.
config
[
'
destination
_host
'
]
self
.
destination
=
self
.
config
[
'
destination
'
]
def
need_archival
(
self
,
content_data
):
"""
Indicate if the content needs to be archived.
...
...
@@ -405,7 +405,7 @@ class ArchiverToBackendWorker(BaseArchiveWorker):
True if we need to archive, False otherwise
"""
if
self
.
destination
_host
in
content_data
.
get
(
'
missing
'
,
{}):
if
self
.
destination
in
content_data
.
get
(
'
missing
'
,
{}):
return
True
return
False
...
...
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