Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions agent-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0] - 2026-05-28

### Changed
- 心跳间隔从 30 秒调整为 20 秒,与 server 固定超时 60 秒形成 T/3 比例,容错 3 次连续丢包

## [0.3.1] - 2026-05-16

### Changed
Expand Down Expand Up @@ -50,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[0.4.0]: https://github.com/Wolido/OpenAaaS/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/Wolido/OpenAaaS/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/Wolido/OpenAaaS/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/Wolido/OpenAaaS/compare/v0.2.0...v0.2.1
Expand Down
2 changes: 1 addition & 1 deletion agent-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent-core"
version = "0.3.1"
version = "0.4.0"
edition = "2024"
description = "OpenAaaS Agent Core - 调度与执行框架"

Expand Down
2 changes: 1 addition & 1 deletion agent-core/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl<E: Executor + 'static> Scheduler<E> {
self.recover_tasks().await?;

// 创建心跳间隔
let mut heartbeat_interval = interval(Duration::from_secs(30));
let mut heartbeat_interval = interval(Duration::from_secs(20));

// 创建轮询间隔
let poll_interval = Duration::from_secs(self.config.server.poll_interval_secs);
Expand Down
7 changes: 7 additions & 0 deletions server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.0] - 2026-05-28

### Changed
- `poll_handler` 不再更新心跳时间戳,poll 变为纯读操作,心跳完全由独立 heartbeat 接口负责
- 离线检测后台任务间隔从 30 秒调整为 10 秒

## [0.6.1] - 2026-05-25

### Fixed
Expand Down Expand Up @@ -69,6 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[0.7.0]: https://github.com/Wolido/OpenAaaS/compare/v0.6.1...v0.7.0
[0.6.1]: https://github.com/Wolido/OpenAaaS/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/Wolido/OpenAaaS/compare/v0.5.1...v0.6.0
[0.5.1]: https://github.com/Wolido/OpenAaaS/compare/v0.5.0...v0.5.1
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "open-aaas-server"
version = "0.6.1"
version = "0.7.0"
edition = "2024"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion server/src/bg_tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use open_aaas_server::state::AppState;
pub fn spawn_heartbeat_task(state: AppState, shutdown_tx: watch::Sender<()>) -> tokio::task::JoinHandle<()> {
let mut shutdown_rx = shutdown_tx.subscribe();
tokio::spawn(async move {
let mut interval = tokio::time::interval(Duration::from_secs(30));
let mut interval = tokio::time::interval(Duration::from_secs(10));
interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Delay);

loop {
Expand Down
3 changes: 0 additions & 3 deletions server/src/handlers/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,6 @@ pub async fn poll_handler(
return Err(AppError::Forbidden);
}

// 更新心跳
update_service_heartbeat(state.db.pool(), &service_id).await?;

// ===== 1. 优先检查是否有 running 的任务需要取消(最高优先级) =====
let cancelling_task = sqlx::query_as::<_, Task>(
"SELECT * FROM tasks WHERE service_id = ? AND status = 'cancelling' LIMIT 1"
Expand Down
Loading