MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / testFinished

Function testFinished

lib/workers.js:60–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58 return;
59 }
60 const testFinished = () => {
61 if (availablePythonCallers.length < pythonCallers.length) {
62 // keep waiting for all pythonCallers to be returned
63 debug('finish(): waiting for availablePythonCallers');
64 setTimeout(testFinished, 100);
65 } else {
66 debug('finish(): calling done() on all pythonCallers');
67 for (let i = 0; i < pythonCallers.length; i++) {
68 pythonCallers[i].done();
69 }
70 pythonCallers = [];
71 availablePythonCallers = [];
72 return callback(null);
73 }
74 };
75 testFinished();
76 },
77

Callers 1

finishFunction · 0.70

Calls 3

debugFunction · 0.85
callbackFunction · 0.85
doneMethod · 0.80

Tested by

no test coverage detected