Skip to content

Commit

Permalink
Add try catch in failure cb
Browse files Browse the repository at this point in the history
vegito22 committed Nov 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f18acb1 commit 245bb1a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions llmstack/sheets/tasks.py
Original file line number Diff line number Diff line change
@@ -618,14 +618,17 @@ def on_sheet_run_success(job, connection, result, *args, **kwargs):


def on_sheet_run_failed(job, connection, type, value, traceback):
sheet_uuid = job.args[0]
run_uuid = job.args[1]
try:
sheet_uuid = job.args[0]
run_uuid = job.args[1]

async_to_sync(channel_layer.group_send)(
run_uuid, {"type": "sheet.error", "error": f"Sheet run failed: {str(type)} - {str(value)}"}
)
async_to_sync(channel_layer.group_send)(
run_uuid, {"type": "sheet.error", "error": f"Sheet run failed: {str(type)} - {str(value)}"}
)

update_sheet_with_post_run_data(sheet_uuid, run_uuid)
update_sheet_with_post_run_data(sheet_uuid, run_uuid)
except Exception:
logger.exception("Error in on_sheet_run_failed")


def on_sheet_run_stopped(job, connection):

0 comments on commit 245bb1a

Please sign in to comment.