fix coordinator compilation

This commit is contained in:
Timur Gordon
2025-11-14 00:35:26 +01:00
parent 84545f0d75
commit 94a66d9af4
15 changed files with 397 additions and 459 deletions

View File

@@ -1,15 +0,0 @@
use std::net::IpAddr;
use serde::{Deserialize, Serialize};
use crate::time::Timestamp;
#[derive(Serialize, Deserialize, Clone)]
pub struct Actor {
id: u32,
pubkey: String,
/// IP where the actor is reachable, can be mycelium but that is not mandatory
address: Vec<IpAddr>,
created_at: Timestamp,
updated_at: Timestamp,
}

View File

@@ -1,7 +1,8 @@
use serde::{Deserialize, Serialize};
use crate::{
models::{Job, ScriptType},
dag::FlowNode,
models::Job,
time::Timestamp,
};
@@ -13,8 +14,10 @@ pub struct Message {
pub caller_id: u32,
/// Id of the context in which this message was sent
pub context_id: u32,
/// Id of the flow this message belongs to (for DAG tracking)
pub flow_id: u32,
pub message: String,
pub message_type: ScriptType,
pub message_type: String, // Deprecated, use job.executor instead
pub message_format_type: MessageFormatType,
/// Seconds for the message to arrive at the destination
pub timeout: u32,
@@ -28,6 +31,9 @@ pub struct Message {
/// Latest transport status as reported by Mycelium
pub transport_status: Option<TransportStatus>,
/// FlowNodes containing routing and dependency info
pub nodes: Vec<FlowNode>,
/// Legacy: Jobs for backward compatibility (TODO: remove after full migration)
pub job: Vec<Job>,
pub logs: Vec<Log>,
pub created_at: Timestamp,

View File

@@ -2,7 +2,6 @@ use std::net::IpAddr;
use serde::{Deserialize, Serialize};
use crate::models::ScriptType;
use crate::time::Timestamp;
#[derive(Serialize, Deserialize, Clone)]
@@ -14,8 +13,8 @@ pub struct Runner {
pub address: IpAddr,
/// Needs to be set by the runner, usually `runner<runnerid`
pub topic: String,
/// The script type this runner can execute; used for routing
pub script_type: ScriptType,
/// The executor this runner can handle (e.g., "python", "rhai"); used for routing
pub executor: String,
/// If this is true, the runner also listens on a local redis queue
pub local: bool,
/// Optional secret used for authenticated supervisor calls (if required)

View File

@@ -1,9 +0,0 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub enum ScriptType {
Osis,
Sal,
V,
Python,
}