Skip to content

Commit

Permalink
refactor(core): improve autoDeleteTimeout configuration
Browse files Browse the repository at this point in the history
- Updated the default value for `autoDeleteTimeout` to use a calculation based on `Time.day` and `Time.second`, enhancing clarity and configurability.
- Adjusted the minimum value for `autoDeleteTimeout` to be relative to `Time.hour`, ensuring better time management in the configuration.
- These changes aim to streamline the configuration logic and improve the overall operational efficiency of the core functionalities.
  • Loading branch information
dingyi222666 committed Dec 17, 2024
1 parent 24e5929 commit e76fddf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ export const Config: Schema<Config> = Schema.intersect([
.default(40),
autoDelete: Schema.boolean().default(false),
autoDeleteTimeout: Schema.number()
.default(86400 * 10)
.min(Time.hour)
.default((Time.day * 10) / Time.second)
.min(Time.hour / Time.second)
}),

Schema.object({
Expand Down

0 comments on commit e76fddf

Please sign in to comment.