From b31651cfeb650eeee16dbea83dac474b0b6bcea3 Mon Sep 17 00:00:00 2001 From: Timur Gordon <31495328+timurgordon@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:41:19 +0200 Subject: [PATCH] make func pub --- core/actor/src/lib.rs | 2 +- core/job/src/builder.rs | 5 +++++ core/job/src/lib.rs | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/actor/src/lib.rs b/core/actor/src/lib.rs index 06d7be5..65afaf5 100644 --- a/core/actor/src/lib.rs +++ b/core/actor/src/lib.rs @@ -15,7 +15,7 @@ const NAMESPACE_PREFIX: &str = "hero:job:"; const BLPOP_TIMEOUT_SECONDS: usize = 5; /// Initialize Redis connection for the actor -pub(crate) async fn initialize_redis_connection( +pub async fn initialize_redis_connection( actor_id: &str, redis_url: &str, ) -> Result> { diff --git a/core/job/src/builder.rs b/core/job/src/builder.rs index 453a16a..7c61756 100644 --- a/core/job/src/builder.rs +++ b/core/job/src/builder.rs @@ -76,6 +76,11 @@ impl JobBuilder { self } + pub fn caller_id(mut self, caller_id: &str) -> Self { + self.caller_id = caller_id.to_string(); + self + } + pub fn script(mut self, script: &str) -> Self { self.script = script.to_string(); self diff --git a/core/job/src/lib.rs b/core/job/src/lib.rs index 33e319b..4ad5fb3 100644 --- a/core/job/src/lib.rs +++ b/core/job/src/lib.rs @@ -7,6 +7,7 @@ use redis::AsyncCommands; use thiserror::Error; mod builder; +pub use builder::JobBuilder; /// Redis namespace prefix for all Hero job-related keys pub const NAMESPACE_PREFIX: &str = "hero:job:";