Revision 16b0afe6
b/kamaki/cli/commands/pithos_cli.py | ||
---|---|---|
1052 | 1052 |
def _run(self, local_path, remote_path): |
1053 | 1053 |
poolsize = self['poolsize'] |
1054 | 1054 |
if poolsize > 0: |
1055 |
self.client.POOL_SIZE = int(poolsize)
|
|
1055 |
self.client.MAX_THREADS = int(poolsize)
|
|
1056 | 1056 |
params = dict( |
1057 | 1057 |
content_encoding=self['content_encoding'], |
1058 | 1058 |
content_type=self['content_type'], |
... | ... | |
1292 | 1292 |
#outputs = self._outputs(local_path) |
1293 | 1293 |
poolsize = self['poolsize'] |
1294 | 1294 |
if poolsize: |
1295 |
self.client.POOL_SIZE = int(poolsize)
|
|
1295 |
self.client.MAX_THREADS = int(poolsize)
|
|
1296 | 1296 |
progress_bar = None |
1297 | 1297 |
try: |
1298 | 1298 |
for f, rpath in self._outputs(local_path): |
b/kamaki/clients/__init__.py | ||
---|---|---|
104 | 104 |
|
105 | 105 |
|
106 | 106 |
class Client(object): |
107 |
POOL_SIZE = 7
|
|
107 |
MAX_THREADS = 7
|
|
108 | 108 |
|
109 | 109 |
def __init__(self, base_url, token, http_client=KamakiHTTPConnection()): |
110 | 110 |
self.base_url = base_url |
... | ... | |
124 | 124 |
def _watch_thread_limit(self, threadlist): |
125 | 125 |
recvlog.debug('# running threads: %s' % len(threadlist)) |
126 | 126 |
if (self._elapsed_old > self._elapsed_new) and ( |
127 |
self._thread_limit < self.POOL_SIZE):
|
|
127 |
self._thread_limit < self.MAX_THREADS):
|
|
128 | 128 |
self._thread_limit += 1 |
129 | 129 |
elif self._elapsed_old < self._elapsed_new and self._thread_limit > 1: |
130 | 130 |
self._thread_limit -= 1 |
Also available in: Unified diff