summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5e4dbac)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
*/
protected run (task: Task<Data>): void {
const { name, taskId, data } = task
*/
protected run (task: Task<Data>): void {
const { name, taskId, data } = task
- if (!this.taskFunctions.has(name ?? DEFAULT_TASK_NAME)) {
+ const taskFunctionName = name ?? DEFAULT_TASK_NAME
+ if (!this.taskFunctions.has(taskFunctionName)) {
this.sendToMainWorker({
workerError: {
name: name as string,
this.sendToMainWorker({
workerError: {
name: name as string,
- const fn = this.taskFunctions.get(name ?? DEFAULT_TASK_NAME)
+ const fn = this.taskFunctions.get(taskFunctionName)
if (isAsyncFunction(fn)) {
this.runInAsyncScope(this.runAsync.bind(this), this, fn, task)
} else {
if (isAsyncFunction(fn)) {
this.runInAsyncScope(this.runAsync.bind(this), this, fn, task)
} else {