Add active evals (#25)

* Add active evals

* Convert type of stats to date or string

* Fix generic overloads for run

* Lower evaluate timeout

* Add comment for createWriteStream
This commit is contained in:
Kyle Carberry
2019-01-29 18:48:02 -06:00
parent 3a88ae5fb2
commit 20f5d8eeed
13 changed files with 640 additions and 40 deletions

View File

@@ -42,7 +42,7 @@ if (goog.DEBUG && !COMPILED) {
* @private {!Array<!Array<number>>}
* @const
*/
proto.ClientMessage.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11]];
proto.ClientMessage.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12]];
/**
* @enum {number}
@@ -59,7 +59,8 @@ proto.ClientMessage.MsgCase = {
CONNECTION_CLOSE: 8,
NEW_SERVER: 9,
SERVER_CLOSE: 10,
NEW_EVAL: 11
NEW_EVAL: 11,
EVAL_EVENT: 12
};
/**
@@ -107,7 +108,8 @@ proto.ClientMessage.toObject = function(includeInstance, msg) {
connectionClose: (f = msg.getConnectionClose()) && command_pb.ConnectionCloseMessage.toObject(includeInstance, f),
newServer: (f = msg.getNewServer()) && command_pb.NewServerMessage.toObject(includeInstance, f),
serverClose: (f = msg.getServerClose()) && command_pb.ServerCloseMessage.toObject(includeInstance, f),
newEval: (f = msg.getNewEval()) && node_pb.NewEvalMessage.toObject(includeInstance, f)
newEval: (f = msg.getNewEval()) && node_pb.NewEvalMessage.toObject(includeInstance, f),
evalEvent: (f = msg.getEvalEvent()) && node_pb.EvalEventMessage.toObject(includeInstance, f)
};
if (includeInstance) {
@@ -199,6 +201,11 @@ proto.ClientMessage.deserializeBinaryFromReader = function(msg, reader) {
reader.readMessage(value,node_pb.NewEvalMessage.deserializeBinaryFromReader);
msg.setNewEval(value);
break;
case 12:
var value = new node_pb.EvalEventMessage;
reader.readMessage(value,node_pb.EvalEventMessage.deserializeBinaryFromReader);
msg.setEvalEvent(value);
break;
default:
reader.skipField();
break;
@@ -325,6 +332,14 @@ proto.ClientMessage.prototype.serializeBinaryToWriter = function (writer) {
node_pb.NewEvalMessage.serializeBinaryToWriter
);
}
f = this.getEvalEvent();
if (f != null) {
writer.writeMessage(
12,
f,
node_pb.EvalEventMessage.serializeBinaryToWriter
);
}
};
@@ -667,6 +682,36 @@ proto.ClientMessage.prototype.hasNewEval = function() {
};
/**
* optional EvalEventMessage eval_event = 12;
* @return {proto.EvalEventMessage}
*/
proto.ClientMessage.prototype.getEvalEvent = function() {
return /** @type{proto.EvalEventMessage} */ (
jspb.Message.getWrapperField(this, node_pb.EvalEventMessage, 12));
};
/** @param {proto.EvalEventMessage|undefined} value */
proto.ClientMessage.prototype.setEvalEvent = function(value) {
jspb.Message.setOneofWrapperField(this, 12, proto.ClientMessage.oneofGroups_[0], value);
};
proto.ClientMessage.prototype.clearEvalEvent = function() {
this.setEvalEvent(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.ClientMessage.prototype.hasEvalEvent = function() {
return jspb.Message.getField(this, 12) != null;
};
/**
* Generated by JsPbCodeGenerator.
@@ -693,7 +738,7 @@ if (goog.DEBUG && !COMPILED) {
* @private {!Array<!Array<number>>}
* @const
*/
proto.ServerMessage.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]];
proto.ServerMessage.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]];
/**
* @enum {number}
@@ -714,8 +759,9 @@ proto.ServerMessage.MsgCase = {
SERVER_CONNECTION_ESTABLISHED: 12,
EVAL_FAILED: 13,
EVAL_DONE: 14,
INIT: 15,
SHARED_PROCESS_ACTIVE: 16
EVAL_EVENT: 15,
INIT: 16,
SHARED_PROCESS_ACTIVE: 17
};
/**
@@ -767,6 +813,7 @@ proto.ServerMessage.toObject = function(includeInstance, msg) {
serverConnectionEstablished: (f = msg.getServerConnectionEstablished()) && command_pb.ServerConnectionEstablishedMessage.toObject(includeInstance, f),
evalFailed: (f = msg.getEvalFailed()) && node_pb.EvalFailedMessage.toObject(includeInstance, f),
evalDone: (f = msg.getEvalDone()) && node_pb.EvalDoneMessage.toObject(includeInstance, f),
evalEvent: (f = msg.getEvalEvent()) && node_pb.EvalEventMessage.toObject(includeInstance, f),
init: (f = msg.getInit()) && proto.WorkingInitMessage.toObject(includeInstance, f),
sharedProcessActive: (f = msg.getSharedProcessActive()) && vscode_pb.SharedProcessActiveMessage.toObject(includeInstance, f)
};
@@ -876,11 +923,16 @@ proto.ServerMessage.deserializeBinaryFromReader = function(msg, reader) {
msg.setEvalDone(value);
break;
case 15:
var value = new node_pb.EvalEventMessage;
reader.readMessage(value,node_pb.EvalEventMessage.deserializeBinaryFromReader);
msg.setEvalEvent(value);
break;
case 16:
var value = new proto.WorkingInitMessage;
reader.readMessage(value,proto.WorkingInitMessage.deserializeBinaryFromReader);
msg.setInit(value);
break;
case 16:
case 17:
var value = new vscode_pb.SharedProcessActiveMessage;
reader.readMessage(value,vscode_pb.SharedProcessActiveMessage.deserializeBinaryFromReader);
msg.setSharedProcessActive(value);
@@ -1035,18 +1087,26 @@ proto.ServerMessage.prototype.serializeBinaryToWriter = function (writer) {
node_pb.EvalDoneMessage.serializeBinaryToWriter
);
}
f = this.getInit();
f = this.getEvalEvent();
if (f != null) {
writer.writeMessage(
15,
f,
node_pb.EvalEventMessage.serializeBinaryToWriter
);
}
f = this.getInit();
if (f != null) {
writer.writeMessage(
16,
f,
proto.WorkingInitMessage.serializeBinaryToWriter
);
}
f = this.getSharedProcessActive();
if (f != null) {
writer.writeMessage(
16,
17,
f,
vscode_pb.SharedProcessActiveMessage.serializeBinaryToWriter
);
@@ -1484,18 +1544,48 @@ proto.ServerMessage.prototype.hasEvalDone = function() {
/**
* optional WorkingInitMessage init = 15;
* optional EvalEventMessage eval_event = 15;
* @return {proto.EvalEventMessage}
*/
proto.ServerMessage.prototype.getEvalEvent = function() {
return /** @type{proto.EvalEventMessage} */ (
jspb.Message.getWrapperField(this, node_pb.EvalEventMessage, 15));
};
/** @param {proto.EvalEventMessage|undefined} value */
proto.ServerMessage.prototype.setEvalEvent = function(value) {
jspb.Message.setOneofWrapperField(this, 15, proto.ServerMessage.oneofGroups_[0], value);
};
proto.ServerMessage.prototype.clearEvalEvent = function() {
this.setEvalEvent(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.ServerMessage.prototype.hasEvalEvent = function() {
return jspb.Message.getField(this, 15) != null;
};
/**
* optional WorkingInitMessage init = 16;
* @return {proto.WorkingInitMessage}
*/
proto.ServerMessage.prototype.getInit = function() {
return /** @type{proto.WorkingInitMessage} */ (
jspb.Message.getWrapperField(this, proto.WorkingInitMessage, 15));
jspb.Message.getWrapperField(this, proto.WorkingInitMessage, 16));
};
/** @param {proto.WorkingInitMessage|undefined} value */
proto.ServerMessage.prototype.setInit = function(value) {
jspb.Message.setOneofWrapperField(this, 15, proto.ServerMessage.oneofGroups_[0], value);
jspb.Message.setOneofWrapperField(this, 16, proto.ServerMessage.oneofGroups_[0], value);
};
@@ -1509,23 +1599,23 @@ proto.ServerMessage.prototype.clearInit = function() {
* @return{!boolean}
*/
proto.ServerMessage.prototype.hasInit = function() {
return jspb.Message.getField(this, 15) != null;
return jspb.Message.getField(this, 16) != null;
};
/**
* optional SharedProcessActiveMessage shared_process_active = 16;
* optional SharedProcessActiveMessage shared_process_active = 17;
* @return {proto.SharedProcessActiveMessage}
*/
proto.ServerMessage.prototype.getSharedProcessActive = function() {
return /** @type{proto.SharedProcessActiveMessage} */ (
jspb.Message.getWrapperField(this, vscode_pb.SharedProcessActiveMessage, 16));
jspb.Message.getWrapperField(this, vscode_pb.SharedProcessActiveMessage, 17));
};
/** @param {proto.SharedProcessActiveMessage|undefined} value */
proto.ServerMessage.prototype.setSharedProcessActive = function(value) {
jspb.Message.setOneofWrapperField(this, 16, proto.ServerMessage.oneofGroups_[0], value);
jspb.Message.setOneofWrapperField(this, 17, proto.ServerMessage.oneofGroups_[0], value);
};
@@ -1539,7 +1629,7 @@ proto.ServerMessage.prototype.clearSharedProcessActive = function() {
* @return{!boolean}
*/
proto.ServerMessage.prototype.hasSharedProcessActive = function() {
return jspb.Message.getField(this, 16) != null;
return jspb.Message.getField(this, 17) != null;
};