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

Added health check API for the image service #84

Merged
merged 2 commits into from
Feb 28, 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
path("", views.index, name="index"),
path("name/<str:image_name>", views.handle_image, name="image"),
path("remote-image", views.get_remote_image, name="remote-image"),
path("health-check/", views.health_check, name="health_check"),
thpierce marked this conversation as resolved.
Show resolved Hide resolved
]
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def index(request):
return HttpResponse("Hello, world LOL!")


def health_check(request):
return HttpResponse("Image Service is up and running!")


@csrf_exempt
def handle_image(request, image_name):
print(image_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ The following are the APIs and what they do:
16. `POST /images/name/<image_name>`: creates an empty file in S3. This is an async endpoint since it will put image
name in an SQS queue and not wait for the file to be created in S3. Instead, a long running thread will poll SQS
and then create the image file later.
17. `GET /image/remote-image`: makes a remote http call to google.com.
17. `GET /image/remote-image`: makes a remote http call to google.com.
18. `GET /image/heatlh-check/`: returns 200 if the image service is up and running.
Loading