Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for plugins #55

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading