Fix misleading comment
This commit is contained in:
@@ -19,9 +19,9 @@ class AsyncTask extends EventEmitter {
|
||||
// subclasses implement this
|
||||
}
|
||||
|
||||
async start() {
|
||||
async start() { // should not throw!
|
||||
debug(`start: ${this.name} started`);
|
||||
const [error] = await safe(this._run(this.#abortController.signal)); // background
|
||||
const [error] = await safe(this._run(this.#abortController.signal));
|
||||
debug(`start: ${this.name} finished`);
|
||||
this.emit('done', { errorMessage: error?.message || '' });
|
||||
this.#abortController = null;
|
||||
|
||||
@@ -197,5 +197,5 @@ async function getFilesystemUsage(req, res, next) {
|
||||
res.end();
|
||||
});
|
||||
|
||||
task.start();
|
||||
task.start(); // background
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user