mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-19 06:14:45 +08:00
feat: add independent load_factor field for scheduling load calculation
- Separate load factor from concurrency: concurrency controls actual slot acquisition, load_factor controls load rate calculation - Add EffectiveLoadFactor() method: LoadFactor > Concurrency > 1 - Add load_factor field to Create/Edit/BulkEdit account forms - Fix RPM default value: auto-fill 15 when RPM enabled but not set - Fix stale test compilation errors in server and handler packages
This commit is contained in:
@@ -97,6 +97,8 @@ func (Account) Fields() []ent.Field {
|
||||
field.Int("concurrency").
|
||||
Default(3),
|
||||
|
||||
field.Int("load_factor").Optional().Nillable(),
|
||||
|
||||
// priority: 账户优先级,数值越小优先级越高
|
||||
// 调度器会优先使用高优先级的账户
|
||||
field.Int("priority").
|
||||
|
||||
Reference in New Issue
Block a user