Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
deanq committed Sep 25, 2024
1 parent 2a6a5cd commit a7b93cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions runpod/serverless/modules/rp_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Job related helpers.
"""

# pylint: disable=too-many-branches

import asyncio
import inspect
import json
Expand Down Expand Up @@ -143,7 +141,7 @@ async def run_job(handler: Callable, job: Dict[str, Any]) -> Dict[str, Any]:

check_return_size(run_result) # Checks the size of the return body.

except Exception as err: # pylint: disable=broad-except
except Exception as err:
error_info = {
"error_type": str(type(err)),
"error_message": str(err),
Expand Down Expand Up @@ -188,7 +186,7 @@ async def run_job_generator(
log.debug(f"Generator output: {output_partial}", job["id"])
yield {"output": output_partial}

except Exception as err: # pylint: disable=broad-except
except Exception as err:
log.error(err, job["id"])
yield {"error": f"handler: {str(err)} \ntraceback: {traceback.format_exc()}"}
finally:
Expand Down
2 changes: 1 addition & 1 deletion runpod/serverless/modules/rp_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from typing import Optional

MAX_MESSAGE_LENGTH = 4096
LOG_LEVELS = ["NOTSET", "DEBUG", "TRACE", "INFO", "WARN", "ERROR"]
LOG_LEVELS = ["NOTSET", "TRACE", "DEBUG", "INFO", "WARN", "ERROR"]


def _validate_log_level(log_level):
Expand Down
2 changes: 1 addition & 1 deletion runpod/serverless/modules/rp_ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _send_ping(self):
)

log.debug(
f"Heartbeat Sent | URL: {self.PING_URL} | Status: {result.status_code}"
f"Heartbeat Sent | URL: {result.url} | Status: {result.status_code}"
)

except requests.RequestException as err:
Expand Down

0 comments on commit a7b93cc

Please sign in to comment.