mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 18:07:47 +08:00
Merge pull request #869 from AAEE86/fix-pool-quota-reset-display
fix(pool): 配额倒计时归零后进度条与列表恢复显示 100%
This commit is contained in:
@@ -43,7 +43,7 @@ pub use quota::{
|
||||
provider_pool_key_model_quota_hard_blocked, provider_pool_key_quota_hard_blocked,
|
||||
provider_pool_key_scheduling_label, provider_pool_member_quota_snapshot,
|
||||
provider_pool_quota_metadata_provider_type, provider_pool_quota_metadata_updated_at,
|
||||
provider_pool_quota_snapshot_updated_at,
|
||||
provider_pool_quota_snapshot_updated_at, provider_pool_reset_deadline_elapsed,
|
||||
};
|
||||
pub use quota_refresh::ProviderPoolQuotaRequestSpec;
|
||||
pub use service::ProviderPoolService;
|
||||
|
||||
@@ -857,7 +857,14 @@ fn provider_pool_reset_deadline_unix_secs(
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn provider_pool_reset_deadline_elapsed(
|
||||
/// Whether the quota window's reset deadline has already passed.
|
||||
///
|
||||
/// The deadline is taken from `reset_at`/`next_reset_at` when present, otherwise
|
||||
/// derived from `reset_seconds`/`reset_after_seconds` anchored at the window (or
|
||||
/// fallback) observation time. Scheduling ignores exhausted windows once this is
|
||||
/// true; read paths can reuse the same predicate so the displayed quota matches
|
||||
/// the scheduling decision after a reset.
|
||||
pub fn provider_pool_reset_deadline_elapsed(
|
||||
item: &Map<String, Value>,
|
||||
fallback_observed_at: Option<u64>,
|
||||
now_unix_secs: u64,
|
||||
|
||||
Reference in New Issue
Block a user