Skip to content

Commit

Permalink
Merge pull request #2061 from dkrenn/dkrenn/event-finished-exec
Browse files Browse the repository at this point in the history
add event for finished execution of cell
  • Loading branch information
minrk authored Jan 25, 2017
2 parents eb73920 + e3bdb15 commit cd47dac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions notebook/static/notebook/js/codecell.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ define([
CodeCell.msg_cells[this.last_msg_id] = this;
this.render();
this.events.trigger('execute.CodeCell', {cell: this});
var that = this;
this.events.on('finished_iopub.Kernel', function (evt, data) {
if (that.kernel.id === data.kernel.id && that.last_msg_id === data.msg_id) {
that.events.trigger('finished_execute.CodeCell', {cell: that});
}
});
};

/**
Expand Down
1 change: 1 addition & 0 deletions notebook/static/services/kernels/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ define([
this.clear_callbacks_for_msg(msg_id);
}
}
this.events.trigger('finished_iopub.Kernel', {kernel: this, msg_id: msg_id});
};

/**
Expand Down

0 comments on commit cd47dac

Please sign in to comment.