rename worker to actor

This commit is contained in:
Timur Gordon
2025-08-05 15:44:33 +02:00
parent 5283f383b3
commit 89e953ca1d
67 changed files with 1629 additions and 1737 deletions

View File

@@ -11,22 +11,22 @@ mod builder;
/// Redis namespace prefix for all Hero job-related keys
pub const NAMESPACE_PREFIX: &str = "hero:job:";
/// Script type enumeration for different worker types
/// Script type enumeration for different actor types
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum ScriptType {
/// OSIS - A worker that executes Rhai/HeroScript
/// OSIS - A actor that executes Rhai/HeroScript
OSIS,
/// SAL - A worker that executes system abstraction layer functionalities in rhai
/// SAL - A actor that executes system abstraction layer functionalities in rhai
SAL,
/// V - A worker that executes heroscript in V
/// V - A actor that executes heroscript in V
V,
/// Python - A worker that executes heroscript in python
/// Python - A actor that executes heroscript in python
Python,
}
impl ScriptType {
/// Get the worker queue suffix for this script type
pub fn worker_queue_suffix(&self) -> &'static str {
/// Get the actor queue suffix for this script type
pub fn actor_queue_suffix(&self) -> &'static str {
match self {
ScriptType::OSIS => "osis",
ScriptType::SAL => "sal",
@@ -81,7 +81,7 @@ impl JobStatus {
/// Representation of a script execution request.
///
/// This structure contains all the information needed to execute a script
/// on a worker service, including the script content, dependencies, and metadata.
/// on a actor service, including the script content, dependencies, and metadata.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Job {
pub id: String,