Skip to content
Snippets Groups Projects
Commit 7d892870 authored by Antoine Pietri's avatar Antoine Pietri
Browse files

cookers: change default config path to vault/cooker

parent 21af1100
No related branches found
Tags v0.0.3
No related merge requests found
...@@ -19,6 +19,7 @@ from swh.storage import get_storage ...@@ -19,6 +19,7 @@ from swh.storage import get_storage
from swh.vault.api.client import RemoteVaultClient from swh.vault.api.client import RemoteVaultClient
DEFAULT_CONFIG_PATH = 'vault/cooker'
DEFAULT_CONFIG = { DEFAULT_CONFIG = {
'storage': ('dict', { 'storage': ('dict', {
'cls': 'remote', 'cls': 'remote',
...@@ -53,7 +54,8 @@ class BaseVaultCooker(metaclass=abc.ABCMeta): ...@@ -53,7 +54,8 @@ class BaseVaultCooker(metaclass=abc.ABCMeta):
cache: the cache where to store the bundle cache: the cache where to store the bundle
obj_id: id of the object to be cooked into a bundle. obj_id: id of the object to be cooked into a bundle.
""" """
self.config = config.load_named_config('vault-cooker', DEFAULT_CONFIG) self.config = config.load_named_config(DEFAULT_CONFIG_PATH,
DEFAULT_CONFIG)
self.obj_type = obj_type self.obj_type = obj_type
self.obj_id = hashutil.hash_to_bytes(obj_id) self.obj_id = hashutil.hash_to_bytes(obj_id)
self.backend = RemoteVaultClient(self.config['vault_url']) self.backend = RemoteVaultClient(self.config['vault_url'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment