MCPcopy Index your code
hub / github.com/PrairieLearn/PrairieLearn / constructor

Method constructor

lib/code-caller.js:104–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102*/
103class PythonCaller {
104 constructor() {
105 debug('enter constructor()');
106 this.uuid = uuidv4();
107 debug(`uuid: ${this.uuid}`);
108 this.child = null;
109 this.callback = null;
110 this.timeoutID = null;
111
112 // variables to accumulate child output
113 this.outputStdout = '';
114 this.outputStderr = '';
115 this.outputBoth = '';
116 this.outputData = '';
117
118 // for error logging
119 this.lastCallData = null;
120
121 this.state = CREATED;
122 this._checkState();
123
124 debug(`exit constructor(), state: ${String(this.state)}, uuid: ${this.uuid}`);
125 }
126
127 call(file, fcn, args, options, callback) {
128 debug(`enter call(), state: ${String(this.state)}, uuid: ${this.uuid}`);

Callers

nothing calls this directly

Calls 2

_checkStateMethod · 0.95
debugFunction · 0.85

Tested by

no test coverage detected