feat: update dependencies and improve development commands in Justfile
This commit is contained in:
@@ -13,7 +13,7 @@ use std::pin::Pin;
|
||||
use tracing::{error, info, warn};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::db::entities::agent;
|
||||
use crate::db::entities::agents;
|
||||
use crate::db::Database;
|
||||
|
||||
/// Agent service implementation
|
||||
@@ -36,9 +36,9 @@ impl AgentServiceImpl {
|
||||
// TODO: Validate token properly
|
||||
// For now, create a new agent record
|
||||
let agent_id = Uuid::new_v4();
|
||||
|
||||
|
||||
let now = Utc::now();
|
||||
let agent = agent::ActiveModel {
|
||||
let agent = agents::ActiveModel {
|
||||
id: Set(agent_id),
|
||||
workspace_id: Set(Uuid::nil()), // TODO: Get from token
|
||||
name: Set(request.hostname.clone()),
|
||||
@@ -78,7 +78,7 @@ impl AgentServiceImpl {
|
||||
|
||||
// Update agent's last_seen_at
|
||||
let now = Utc::now();
|
||||
let agent = agent::ActiveModel {
|
||||
let agent = agents::ActiveModel {
|
||||
id: Set(agent_uuid),
|
||||
last_seen_at: Set(Some(now.into())),
|
||||
..Default::default()
|
||||
@@ -115,7 +115,7 @@ impl AgentService for AgentServiceImpl {
|
||||
let output_stream = async_stream::try_stream! {
|
||||
while let Some(result) = stream.message().await? {
|
||||
let msg = result;
|
||||
|
||||
|
||||
// Handle different message types via payload
|
||||
if let Some(payload) = msg.payload {
|
||||
use nxmesh_proto::agent_message::Payload;
|
||||
@@ -165,7 +165,7 @@ impl AgentService for AgentServiceImpl {
|
||||
.and_then(|v| v.to_str().ok())
|
||||
.unwrap_or("unknown")
|
||||
.to_string();
|
||||
|
||||
|
||||
let report = request.into_inner();
|
||||
|
||||
self.handle_health_report(report, &agent_id).await?;
|
||||
|
||||
Reference in New Issue
Block a user