Skip to content

Commit

Permalink
Merge branch 'dev-v3' into prod-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
NotChristianGarcia committed Jan 3, 2024
2 parents 96f12e8 + f2034c8 commit 17beef6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-push-all-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Get tag name from branch. SED removes `v3-release-`; replaces `prod-v3` with `staging`.
id: get_tag_name
shell: bash
run: echo "tag_name=$(echo ${GITHUB_REF#refs/heads/} | sed 's/prod-v3/staging/g' | sed 's/v3-release-//g')" >> $GITHUB_OUTPUT
run: echo "tag_name=$(echo ${GITHUB_REF#refs/heads/} | sed 's/prod-v3/staging/g' | sed 's/v3-release-//g' | sed 's/-v3//g')" >> $GITHUB_OUTPUT

- name: Checkout repo
uses: actions/checkout@v3
Expand Down
17 changes: 12 additions & 5 deletions actors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import time

# Initialize as normal if this module is NOT called from a test container.
# This allows us to not use flaskbase when calling codes.py
Expand All @@ -11,8 +12,14 @@
logger = get_logger(__name__)

Tenants = TenantCache()
try:
t = get_service_tapis_client(tenants=Tenants)
except Exception as e:
logger.error(f'Could not instantiate tapy service client. Exception: {e}')
raise e
for _ in range(5):
try:
t = get_service_tapis_client(tenants=Tenants)
break # Exit the loop if t is successfully created
except Exception as e:
logger.error(f'Could not instantiate tapy service client. Exception: {e}')
time.sleep(2) # Delay for 2 seconds before the next attempt
else:
msg = 'Failed to create tapy service client after 10 attempts, networking?'
logger.error(msg)
raise RuntimeError(msg)

0 comments on commit 17beef6

Please sign in to comment.