mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 08:36:01 +00:00
public commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { Type } from "core/utils";
|
||||
import { Task } from "../Task";
|
||||
|
||||
export class LogTask extends Task<typeof LogTask.schema> {
|
||||
type = "log";
|
||||
|
||||
static override schema = Type.Object({
|
||||
delay: Type.Number({ default: 10 })
|
||||
});
|
||||
|
||||
async execute() {
|
||||
await new Promise((resolve) => setTimeout(resolve, this.params.delay));
|
||||
console.log(`[DONE] LogTask: ${this.name}`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user