From a18c9ab570041ed9fc3fa145dbb72976f2a87132 Mon Sep 17 00:00:00 2001 From: David Kydd Date: Wed, 31 Jan 2018 17:24:44 +1300 Subject: [PATCH] pull default_threads out as method --- azure_batch_maya/scripts/config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/azure_batch_maya/scripts/config.py b/azure_batch_maya/scripts/config.py index 8dce08e..934a30e 100644 --- a/azure_batch_maya/scripts/config.py +++ b/azure_batch_maya/scripts/config.py @@ -59,7 +59,7 @@ class AzureBatchConfig(object): """ self.ui = None self.session = start - self.threads = 20 + self.threads = self.default_threads() self._tab_index = index self._data_dir = os.path.join(maya.prefs_dir(), 'AzureBatchData') self._ini_file = "azure_batch.ini" @@ -331,7 +331,7 @@ class AzureBatchConfig(object): try: self.threads = self._cfg.getint('AzureBatch', 'threads') except ConfigParser.NoOptionError: - self.threads = 20 + self.threads = self.default_threads() finally: if self._client != None: self._client.threads = self.threads @@ -543,6 +543,10 @@ class AzureBatchConfig(object): def default_logging(self): return 10 + + def default_threads(self): + return 20 + def convert_timezone_naive_expireson_to_utc(self, token): # we want to store token expiry times as UTC for consistency if 'expiresOnUTC' not in token: