[core] delay policy

fix #587
This commit is contained in:
devlikepro committed 2024-10-16 13:53:12 +07:00
1 parent 83e2405151
commit 5be2ca0deb
1 file changed
+13
+13
View File
@@ -11,6 +11,12 @@ import {
ValidateNested,
} from 'class-validator';
export enum RetryPolicy {
LINEAR = 'linear',
EXPONENTIAL = 'exponential',
CONSTANT = 'constant',
}
export class RetriesConfiguration {
@ApiProperty({
example: 2,
@@ -25,6 +31,13 @@ export class RetriesConfiguration {
@IsNumber()
@IsOptional()
attempts?: number;
@ApiProperty({
example: RetryPolicy.LINEAR,
})
@IsOptional()
@IsEnum(RetryPolicy)
policy?: RetryPolicy;
}
export class CustomHeader {