Skip to content

Commit

Permalink
Add logging to handler function
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthganta182 committed Mar 3, 2024
1 parent 6e689b0 commit 25a8d26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

import os
import runpod

import logging
# If your handler runs inference on a model, load the model here.
# You will want models to be loaded into memory before starting serverless.


def handler(job):
""" Handler function that will be used to process jobs. """
print(f"Received job: {job}")
job_input = job['input']
name = job_input.get('name', 'World')
# LOG
logging.info(f"Received job: {job}")
return f"You are **whispering**, {name}!"

if not os.environ["LOCAL"]:
Expand Down

0 comments on commit 25a8d26

Please sign in to comment.