Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163774
D1148.id3619.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
819 B
Subscribers
None
D1148.id3619.diff
View Options
diff --git a/swh/indexer/indexer.py b/swh/indexer/indexer.py
--- a/swh/indexer/indexer.py
+++ b/swh/indexer/indexer.py
@@ -14,6 +14,12 @@
from contextlib import contextmanager
from swh.scheduler import get_scheduler
+try:
+ from swh.scheduler import CONFIG as SWH_CONFIG
+except ImportError:
+ # for swh-scheduler < 0.0.47 bw compat
+ SWH_CONFIG = None
+
from swh.storage import get_storage
from swh.core.config import SWHConfig
from swh.objstorage import get_objstorage
@@ -134,6 +140,8 @@
super().__init__()
if config is not None:
self.config = config
+ elif SWH_CONFIG:
+ self.config = SWH_CONFIG.copy()
else:
config_keys = ('base_filename', 'config_filename',
'additional_configs', 'global_config')
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 3:17 PM (1 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3215115
Attached To
D1148: config: use already loaded swh config, if any, when instantiating an Indexer
Event Timeline
Log In to Comment