chore(server): add job backoff strategies (#12499)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Implemented an exponential backoff retry strategy for job queues, resulting in progressively longer wait times between retry attempts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
fengmk2
2025-05-26 02:33:58 +00:00
parent adbdf32d8b
commit e3d63896bf
2 changed files with 7 additions and 1 deletions

View File

@@ -29,6 +29,8 @@ defineModuleConfig('job', {
desc: 'The config for job queues',
default: {
attempts: 5,
// retry after 2 ^ (attempts - 1) * delay milliseconds
backoff: { type: 'exponential', delay: 1000 },
// should remove job after it's completed, because we will add a new job with the same job id
removeOnComplete: true,
removeOnFail: {