Skip to content

Commit

Permalink
Merge pull request #50 from ibab/more-threads
Browse files Browse the repository at this point in the history
Use more threads for docker
  • Loading branch information
betatim committed Mar 5, 2016
2 parents 086859f + afa8767 commit 250fd09
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions everware/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ def __init__(self, **kwargs):
self._cur_waiter = None
super(CustomDockerSpawner, self).__init__(**kwargs)


# We override the executor here to increase the number of threads
@property
def executor(self):
"""single global executor"""
cls = self.__class__
if cls._executor is None:
cls._executor = ThreadPoolExecutor(20)
return cls._executor


def _docker(self, method, *args, **kwargs):
"""wrapper for calling docker methods
Expand Down

0 comments on commit 250fd09

Please sign in to comment.