Skip to content

Commit ccbfa94

Browse files
Merge pull request #55 from antgonza/fix-for-plugins
Fix for plugins
2 parents 21afbc4 + 87c6d64 commit ccbfa94

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

qiita_client/plugin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def _register_command(self, command):
188188
command: QiitaCommand
189189
The command to be added to the plugin
190190
"""
191-
logger.debug('Entered BaseQiitaPlugin._register_command()')
191+
logger.debug(
192+
f'Entered BaseQiitaPlugin._register_command({command.name})')
192193
self.task_dict[command.name] = command
193194

194195
def _register(self, qclient):

qiita_client/qiita_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
# if the log level is not CRITICAL, the default, then we not expect slow
3232
# responses from the server so let's make the retries values small
3333
if logger.level != logging.CRITICAL:
34-
MAX_RETRIES = 2
35-
MIN_TIME_SLEEP = 2
36-
MAX_TIME_SLEEP = 5
34+
MAX_RETRIES = 1
35+
MIN_TIME_SLEEP = 6
36+
MAX_TIME_SLEEP = 12
3737
else:
3838
MAX_RETRIES = 3
3939
MIN_TIME_SLEEP = 180

qiita_client/testing.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ def setUpClass(cls):
2525
cls.client_id = '19ndkO3oMKsoChjVVWluF7QkxHRfYhTKSFbAVt8IhK7gZgDaO4'
2626
cls.client_secret = ('J7FfQ7CQdOxuKhQAf1eoGgBAE81Ns8Gu3EKaWFm3IO2JKh'
2727
'AmmCWZuabe0O5Mp28s1')
28+
# qiita_port needs to be the main worker in qiita, the default is 21174
29+
qiita_port = environ.get('QIITA_PORT', '21174')
2830
cls.ca_cert = environ.get('QIITA_ROOTCA_CERT')
2931

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

3536
logger.debug(
3637
'PluginTestCase.setUpClass() token %s' % cls.qclient._token)

0 commit comments

Comments
 (0)