Skip to content

Commit

Permalink
Fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaoumov committed Nov 21, 2024
1 parent 940400b commit d853b64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/obsidian/Queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ interface Queue {
}

interface QueueItem {
fn(): MaybePromise<void>;
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
fn(this: void): MaybePromise<void>;
stackTrace: string;
timeoutInMilliseconds: number;
}
Expand Down Expand Up @@ -76,6 +77,6 @@ async function processNextQueueItem(app: App): Promise<void> {
return;
}

await addErrorHandler(() => runWithTimeout(item.timeoutInMilliseconds, () => invokeAsyncAndLog(processNextQueueItem.name, () => item.fn(), item.stackTrace)));
await addErrorHandler(() => runWithTimeout(item.timeoutInMilliseconds, () => invokeAsyncAndLog(processNextQueueItem.name, item.fn, item.stackTrace)));
queue.items.shift();
}

0 comments on commit d853b64

Please sign in to comment.