Skip to content

Commit c41d13e

Browse files
committed
python sample app update healthcheck
1 parent 06255a9 commit c41d13e

File tree

2 files changed

+7
-6
lines changed
  • sample-apps/python
    • django_frontend_service/frontend_service_app
    • django_remote_service/django_remote_service

2 files changed

+7
-6
lines changed

sample-apps/python/django_frontend_service/frontend_service_app/views.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
## SPDX-License-Identifier: Apache-2.0
3-
from django.http import HttpResponse, JsonResponse
4-
import boto3
53
import logging
4+
import threading
5+
import time
6+
7+
import boto3
68
import requests
79
import schedule
8-
import time
9-
import threading
10+
from django.http import HttpResponse, JsonResponse
1011
from opentelemetry import trace
1112
from opentelemetry.trace.span import format_trace_id
1213

@@ -75,7 +76,7 @@ def http_call(request):
7576
def downstream_service(request):
7677
ip = request.GET.get('ip', '')
7778
ip = ip.replace("/", "")
78-
url = f"http://{ip}:8001/health-check"
79+
url = f"http://{ip}:8001/healthcheck"
7980
try:
8081
response = requests.get(url)
8182
status_code = response.status_code

sample-apps/python/django_remote_service/django_remote_service/urls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
from remote_service_app import views
55

66
urlpatterns = [
7-
path('health-check', views.healthcheck),
7+
path('healthcheck', views.healthcheck),
88
]

0 commit comments

Comments
 (0)