Chore(trace): print trace for one-off task

This commit is contained in:
SukkaW 2024-10-12 12:51:43 +08:00
parent a36d61e73c
commit 7b3d422df6

View File

@ -104,6 +104,9 @@ export function task(importMetaMain: boolean, importMetaPath: string) {
const dummySpan = createSpan(taskName);
if (importMetaMain) {
fn(dummySpan).finally(() => {
dummySpan.stop();
printTraceResult(dummySpan.traceResult);
console.log(wtf.dump());
});
}