Skip to content

Commit

Permalink
Merge pull request #55 from antgonza/fix-for-plugins
Browse files Browse the repository at this point in the history
Fix for plugins
  • Loading branch information
charles-cowart authored Sep 5, 2024
2 parents 21afbc4 + 87c6d64 commit ccbfa94
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion qiita_client/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def _register_command(self, command):
command: QiitaCommand
The command to be added to the plugin
"""
logger.debug('Entered BaseQiitaPlugin._register_command()')
logger.debug(
f'Entered BaseQiitaPlugin._register_command({command.name})')
self.task_dict[command.name] = command

def _register(self, qclient):
Expand Down
6 changes: 3 additions & 3 deletions qiita_client/qiita_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
# if the log level is not CRITICAL, the default, then we not expect slow
# responses from the server so let's make the retries values small
if logger.level != logging.CRITICAL:
MAX_RETRIES = 2
MIN_TIME_SLEEP = 2
MAX_TIME_SLEEP = 5
MAX_RETRIES = 1
MIN_TIME_SLEEP = 6
MAX_TIME_SLEEP = 12
else:
MAX_RETRIES = 3
MIN_TIME_SLEEP = 180
Expand Down
7 changes: 4 additions & 3 deletions qiita_client/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ def setUpClass(cls):
cls.client_id = '19ndkO3oMKsoChjVVWluF7QkxHRfYhTKSFbAVt8IhK7gZgDaO4'
cls.client_secret = ('J7FfQ7CQdOxuKhQAf1eoGgBAE81Ns8Gu3EKaWFm3IO2JKh'
'AmmCWZuabe0O5Mp28s1')
# qiita_port needs to be the main worker in qiita, the default is 21174
qiita_port = environ.get('QIITA_PORT', '21174')
cls.ca_cert = environ.get('QIITA_ROOTCA_CERT')

# do not rely on defining ca_cert for these tests. Instead append
# the appropriate CA cert to certifi's pem file.
url = URL.replace('8383', qiita_port)
cls.qclient = QiitaClient(
URL, cls.client_id, cls.client_secret, cls.ca_cert)
url, cls.client_id, cls.client_secret, cls.ca_cert)

logger.debug(
'PluginTestCase.setUpClass() token %s' % cls.qclient._token)
Expand Down

0 comments on commit ccbfa94

Please sign in to comment.