mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 10:57:03 +08:00
refactor: 抽离 AI pipeline 与调度共享能力逻辑
This commit is contained in:
@@ -503,6 +503,8 @@ pub(super) fn sample_request_candidate(
|
||||
created_at_unix_secs: i64,
|
||||
finished_at_unix_secs: Option<i64>,
|
||||
) -> StoredRequestCandidate {
|
||||
let created_at_unix_ms = created_at_unix_secs * 1_000;
|
||||
let finished_at_unix_ms = finished_at_unix_secs.map(|v| v * 1_000);
|
||||
StoredRequestCandidate::new(
|
||||
id.to_string(),
|
||||
request_id.to_string(),
|
||||
@@ -525,9 +527,9 @@ pub(super) fn sample_request_candidate(
|
||||
Some(1),
|
||||
None,
|
||||
None,
|
||||
created_at_unix_secs,
|
||||
Some(created_at_unix_secs),
|
||||
finished_at_unix_secs,
|
||||
created_at_unix_ms,
|
||||
Some(created_at_unix_ms),
|
||||
finished_at_unix_ms,
|
||||
)
|
||||
.expect("request candidate should build")
|
||||
}
|
||||
@@ -562,9 +564,9 @@ pub(super) fn sample_recent_key_rpm_candidate(
|
||||
Some(concurrent_requests),
|
||||
None,
|
||||
None,
|
||||
now_unix_secs - 10,
|
||||
Some(now_unix_secs - 10),
|
||||
Some(now_unix_secs - 8),
|
||||
(now_unix_secs - 10) * 1_000,
|
||||
Some((now_unix_secs - 10) * 1_000),
|
||||
Some((now_unix_secs - 8) * 1_000),
|
||||
)
|
||||
.expect("request candidate should build")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user