Skip to content

Commit

Permalink
Quick: Fix check_or_configure_system_and_user_directory retry(); …
Browse files Browse the repository at this point in the history
…Update `<SystemsPushKeysModal />` wording. (#1376)

* fix retry call; update wording on push keys modal

* use bind=True
  • Loading branch information
rstijerina authored Jul 25, 2024
1 parent a9e1142 commit 3db894e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,10 @@ export const SystemsPushKeysModalBody: React.FC<{
message={
<>
To proceed, you must authenticate to this system with a six-digit
one time passcode at least once. If you have not yet created an MFA
pairing for your account, navigate to your{' '}
<a href="https://tacc.utexas.edu/portal/account" target="_blank">
TACC User Portal Account
</a>
. A public key will be pushed to your <code>authorized_keys</code>{' '}
file on the system below. This will allow you to access this system
from this portal.
one time passcode at least once using the same MFA App you used to
log in to DesignSafe. A public key will be pushed to your{' '}
<code>authorized_keys</code> file on the system below. This will
allow you to access this system from this portal.
</>
}
showIcon
Expand Down
7 changes: 3 additions & 4 deletions designsafe/apps/auth/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from tapipy.errors import NotFoundError, BaseTapyException
from designsafe.utils.system_access import register_public_key, create_system_credentials
from designsafe.utils.encryption import createKeyPair
from requests import HTTPError
from django.contrib.auth import get_user_model
import logging

Expand All @@ -32,8 +31,8 @@ def get_systems_to_configure(username):
return systems


@shared_task(default_retry_delay=30, max_retries=3, queue='onboarding')
def check_or_configure_system_and_user_directory(username, system_id, path, create_path):
@shared_task(default_retry_delay=30, max_retries=3, queue='onboarding', bind=True)
def check_or_configure_system_and_user_directory(self, username, system_id, path, create_path):
try:
user_client = get_user_model().objects.get(username=username).tapis_oauth.client
user_client.files.listFiles(
Expand Down Expand Up @@ -86,7 +85,7 @@ def check_or_configure_system_and_user_directory(username, system_id, path, crea
public_key,
private_key,
system_id)
except BaseTapyException:
except BaseTapyException as exc:
logger.exception('Failed to configure system (i.e. create directory, set acl, create credentials).',
extra={'user': username,
'systemId': system_id,
Expand Down

0 comments on commit 3db894e

Please sign in to comment.