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

fix the WorkerFinished event creation #689

Merged
merged 4 commits into from
Sep 30, 2021
Merged
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
6 changes: 5 additions & 1 deletion yapapi/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,11 @@ async def _worker(
instance = None
except Exception:
if agreement_id:
self.emit(events.WorkerFinished(agr_id=agreement_id, exc_info=sys.exc_info()))
self.emit(
events.WorkerFinished(
job_id=self._job.id, agr_id=agreement_id, exc_info=sys.exc_info()
)
)
else:
# This shouldn't happen, we may log and return as well
logger.error("Failed to spawn instance", exc_info=True)
Expand Down