Revision be433794
b/snf-pithos-backend/pithos/backends/__init__.py | ||
---|---|---|
33 | 33 |
|
34 | 34 |
import warnings |
35 | 35 |
|
36 |
from pithos.workers import glue |
|
37 |
from archipelago.common import Segment, Xseg_ctx |
|
38 |
from objpool import ObjectPool |
|
39 |
from synnefo.settings import BACKEND_ARCHIPELAGO_CONF as cfile |
|
40 |
|
|
41 |
|
|
42 |
glue.WorkerGlue.setupXsegPool(ObjectPool, Segment, Xseg_ctx, cfile, |
|
43 |
pool_size=8) |
|
44 |
|
|
45 | 36 |
|
46 | 37 |
def connect_backend(**kwargs): |
47 | 38 |
from pithos.backends.modular import ModularBackend |
b/snf-pithos-backend/pithos/backends/lib/hashfiler/__init__.py | ||
---|---|---|
34 | 34 |
from store import Store |
35 | 35 |
|
36 | 36 |
__all__ = ["Store"] |
37 |
|
|
38 |
|
|
39 |
from pithos.workers import glue |
|
40 |
from archipelago.common import Segment, Xseg_ctx |
|
41 |
from objpool import ObjectPool |
|
42 |
from synnefo.settings import BACKEND_ARCHIPELAGO_CONF as cfile |
|
43 |
|
|
44 |
|
|
45 |
glue.WorkerGlue.setupXsegPool(ObjectPool, Segment, Xseg_ctx, cfile, |
|
46 |
pool_size=8) |
|
47 |
|
b/snf-pithos-backend/pithos/workers/glue.py | ||
---|---|---|
49 | 49 |
|
50 | 50 |
@classmethod |
51 | 51 |
def setupXsegPool(cls, ObjectPool, Segment, Xseg_ctx, cfile, pool_size=8): |
52 |
if WorkerGlue.worker_id == None: |
|
53 |
return |
|
52 | 54 |
worker_id = WorkerGlue.worker_id |
53 | 55 |
ARCHIPELAGO_CONF_FILE = cfile |
54 | 56 |
ARCHIPELAGO_SEGMENT_TYPE = 'segdev' |
Also available in: Unified diff