@@ -336,22 +336,25 @@ class RemoteWorkspace(Workspace):
336
336
337
337
This is a read only version of the :py:class:`Workspace`
338
338
"""
339
- def __init__ (self , url , es = None ):
339
+ def __init__ (self , url , es = None , index_prefix = None ):
340
340
"""
341
341
:param str url:
342
342
The URL of the unicore.distribute server.
343
- :param es dict:
343
+ :param dict es :
344
344
The parameters for connecting to Elasticsearch to. If not specified
345
345
then the default unicore.distribute ES proxy would be used.
346
346
This defaults to ``/esapi`` on the host of the ``url`` parameter
347
347
provided.
348
+ :param str index_prefix:
349
+ The prefix to use when generating index names for Elasticsearch
348
350
"""
349
351
self .es_settings = es or {'urls' : urljoin (url , '/esapi' )}
352
+ self .index_prefix = index_prefix or self .sm .repo_name
350
353
self .sm = RemoteStorageManager (url )
351
354
self .im = ESManager (
352
355
self .sm ,
353
356
es = get_es (** self .es_settings ),
354
- index_prefix = self .sm . repo_name )
357
+ index_prefix = self .index_prefix )
355
358
356
359
def pull (self , branch_name = 'master' , remote_name = 'origin' ):
357
360
# TOOD: In the local storage we're diffing the changes pulled in
@@ -416,6 +419,5 @@ def init_repo(cls, workdir, bare=False):
416
419
def clone_repo (cls , repo_url , workdir ):
417
420
return Repo .clone_from (repo_url , workdir )
418
421
419
-
420
422
Q
421
423
F
0 commit comments