Skip to content

Commit

Permalink
Store information about execution failure timing (jupyterlab#15285)
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski authored Oct 29, 2023
1 parent a264a94 commit 238af0a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/cells/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,15 @@ export namespace CodeCell {
// execution, clear the prompt.
if (future && !cell.isDisposed && cell.outputArea.future === future) {
cell.setPrompt('');
if (recordTiming && future.isDisposed) {
// Record the time when the cell execution was aborted
const timingInfo: any = Object.assign(
{},
model.getMetadata('execution')
);
timingInfo['execution_failed'] = new Date().toISOString();
model.setMetadata('execution', timingInfo);
}
}
throw e;
}
Expand Down

0 comments on commit 238af0a

Please sign in to comment.