Skip to content

Commit

Permalink
Wrap job in fiber if it isn't in one
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern committed Dec 6, 2024
1 parent 7e8e016 commit 06ee2f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/kadira.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,12 @@ Kadira.traceJob = function (details, processor) {
return processor.apply(this, arguments);
}

if (!Fibers.current) {
return Fibers(function () {
return Kadira.traceJob();
}).run();
}

let wait = details.waitTime || 0;

let data = details.data;
Expand Down

0 comments on commit 06ee2f6

Please sign in to comment.