@diamir/nestjs-retry
v11.0.2
Published
Nestjs decorator to trigger retry on failure
Readme
nestjs-retry
Description
Wrap a class method with this decorator to retry it couple of more times. Useful for external service dependent tasks.
The method must return a Promise of any kind.
Usage
import { Retry } from '@diamir/nestjs-retry'
@Retry({
name: 'example',
retry: 24, // retry count
interval: 3 * 1000 // timeout before next try
})
example(): Promise<void> {
// some logic that could throw
}