mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-24 16:01:05 -04:00
fix: flush logs straight after evaluation (#38011)
If test evaluation takes too long the worker can timeout and any logs will be lost. Flushing the logs before test evaluation avoids this.
This commit is contained in:
committed by
mrugesh
parent
0a0cbead58
commit
e2b357bb56
@@ -47,7 +47,8 @@ const __utils = (() => {
|
||||
return {
|
||||
postResult,
|
||||
log,
|
||||
toggleProxyLogger
|
||||
toggleProxyLogger,
|
||||
flushLogs
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -71,6 +72,7 @@ self.onmessage = async e => {
|
||||
// generated during testing.
|
||||
testResult = eval(`
|
||||
${e.data.build}
|
||||
__utils.flushLogs();
|
||||
__userCodeWasExecuted = true;
|
||||
__utils.toggleProxyLogger(true);
|
||||
${e.data.testString}
|
||||
|
||||
Reference in New Issue
Block a user