make func pub
This commit is contained in:
parent
831b25dbfa
commit
b31651cfeb
@ -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<redis::aio::MultiplexedConnection, Box<dyn std::error::Error + Send + Sync>> {
|
||||
|
@ -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
|
||||
|
@ -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:";
|
||||
|
Loading…
Reference in New Issue
Block a user