Skip to content

Commit

Permalink
Fix serverless...
Browse files Browse the repository at this point in the history
The base image had been overwriting the runpod webhook urls
This prevented the job results from returning.

webhook_url is no longer mandatory
  • Loading branch information
robballantyne committed Feb 14, 2024
1 parent 1154ef2 commit 5451921
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ stopasgroup=true
killasgroup=true
stdout_logfile=/var/log/supervisor/comfyui.log
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=1
stderr_logfile=/dev/null
stdout_logfile_backups=0
stderr_logfile_maxbytes=0
stderr_logfile_backups=0
redirect_stderr=true
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ killasgroup=true
stdout_logfile=/var/log/supervisor/comfyui-rp-api.log
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=1
stderr_logfile=/dev/null
stderr_logfile_maxbytes=0
stderr_logfile_backups=0
redirect_stderr=true
6 changes: 5 additions & 1 deletion build/COPY_ROOT/opt/serverless/handlers/basehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,12 @@ def get_s3_settings(self):
settings["connect_attempts"] = 1
return settings

# Webhook cannot be mandatory. Quick fix
def invoke_webhook(self, success = False, result = {}, error = ""):
webhook_url = self.get_value("webhook_url", os.environ.get("WEBHOOK_URL"))
try:
webhook_url = self.get_value("webhook_url", os.environ.get("WEBHOOK_URL"))
except:
return None
webhook_extra_params = self.get_value("webhook_extra_params", {})

if Network.is_url(webhook_url):
Expand Down

0 comments on commit 5451921

Please sign in to comment.