constructor () {
// eslint-disable-next-line @typescript-eslint/promise-function-async
super((data: MyData) => this.process(data), {
- maxInactiveTime: 60000,
- async: true
+ maxInactiveTime: 60000
})
}
private async process (data: MyData): Promise<MyResponse> {
- return await new Promise(resolve => {
+ return await new Promise((resolve) => {
setTimeout(() => {
resolve({ message: 'Hello from Worker :)', data })
}, 10000)