Revision 9b3a95f1
b/snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagoblocker.py | ||
---|---|---|
50 | 50 |
|
51 | 51 |
monkey.patch_Request() |
52 | 52 |
|
53 |
from pithos.api.settings import BACKEND_ARCHIPELAGO_CONF |
|
54 |
|
|
55 | 53 |
|
56 | 54 |
class ArchipelagoBlocker(object): |
57 | 55 |
"""Blocker. |
... | ... | |
64 | 62 |
|
65 | 63 |
def __init__(self, **params): |
66 | 64 |
cfg = {} |
67 |
bcfg = open(BACKEND_ARCHIPELAGO_CONF).read()
|
|
65 |
bcfg = open(glue.WorkerGlue.ArchipelagoConfFile).read()
|
|
68 | 66 |
cfg['blockerb'] = re.search('\'blockerb_port\'\s*:\s*\d+', |
69 | 67 |
bcfg).group(0).split(':')[1] |
70 | 68 |
blocksize = params['blocksize'] |
b/snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagomapper.py | ||
---|---|---|
52 | 52 |
|
53 | 53 |
monkey.patch_Request() |
54 | 54 |
|
55 |
from pithos.api.settings import BACKEND_ARCHIPELAGO_CONF |
|
56 |
|
|
57 | 55 |
|
58 | 56 |
class ArchipelagoMapper(object): |
59 | 57 |
"""Mapper. |
... | ... | |
65 | 63 |
def __init__(self, **params): |
66 | 64 |
self.params = params |
67 | 65 |
self.namelen = params['namelen'] |
68 |
ioctx_pool = glue.WorkerGlue().ioctx_pool |
|
69 | 66 |
cfg = {} |
70 |
bcfg = open(BACKEND_ARCHIPELAGO_CONF).read()
|
|
67 |
bcfg = open(glue.WorkerGlue.ArchipelagoConfFile).read()
|
|
71 | 68 |
cfg['blockerm'] = re.search('\'blockerm_port\'\s*:\s*\d+', |
72 | 69 |
bcfg).group(0).split(':')[1] |
73 | 70 |
cfg['mapperd'] = re.search('\'mapper_port\'\s*:\s*\d+', |
74 | 71 |
bcfg).group(0).split(':')[1] |
75 |
self.ioctx_pool = ioctx_pool |
|
72 |
self.ioctx_pool = glue.WorkerGlue().ioctx_pool
|
|
76 | 73 |
self.dst_port = int(cfg['blockerm']) |
77 | 74 |
self.mapperd_port = int(cfg['mapperd']) |
78 | 75 |
|
Also available in: Unified diff