Production deployment with zinit config
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
use hero_supervisor_openrpc_client::{
|
||||
SupervisorClient, RunnerConfig, RunnerType, ProcessManagerType,
|
||||
JobBuilder, JobType
|
||||
JobBuilder
|
||||
};
|
||||
use std::time::Duration;
|
||||
use escargot::CargoBuild;
|
||||
@@ -135,8 +135,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.caller_id("comprehensive_client")
|
||||
.context_id("demo")
|
||||
.payload(payload)
|
||||
.job_type(JobType::OSIS)
|
||||
.runner("basic_example_actor")
|
||||
.executor("rhai")
|
||||
.timeout(30)
|
||||
.build()?;
|
||||
|
||||
@@ -163,8 +163,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.caller_id("sync_client")
|
||||
.context_id("sync_demo")
|
||||
.payload(payload)
|
||||
.job_type(JobType::OSIS)
|
||||
.runner("basic_example_actor")
|
||||
.executor("rhai")
|
||||
.timeout(30)
|
||||
.build()?;
|
||||
|
||||
|
||||
@@ -188,3 +188,9 @@ async fn test_nonexistent_job_operations() -> Result<(), Box<dyn std::error::Err
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("Integration test example - this would contain test logic");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -213,13 +213,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("-------------------------------");
|
||||
|
||||
match client.jobs_list().await {
|
||||
Ok(job_ids) => {
|
||||
println!("✅ Found {} jobs in the system:", job_ids.len());
|
||||
for (i, job_id) in job_ids.iter().take(10).enumerate() {
|
||||
println!(" {}. {}", i + 1, job_id);
|
||||
Ok(jobs) => {
|
||||
println!("✅ Found {} jobs in the system:", jobs.len());
|
||||
for (i, job) in jobs.iter().take(10).enumerate() {
|
||||
println!(" {}. {}", i + 1, job.id);
|
||||
}
|
||||
if job_ids.len() > 10 {
|
||||
println!(" ... and {} more", job_ids.len() - 10);
|
||||
if jobs.len() > 10 {
|
||||
println!(" ... and {} more", jobs.len() - 10);
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
|
||||
@@ -14,7 +14,7 @@ use std::time::Duration;
|
||||
use tokio::time::sleep;
|
||||
use redis::AsyncCommands;
|
||||
use hero_supervisor::{
|
||||
Job, JobStatus, JobError, client::{Client, ClientBuilder}
|
||||
Job, JobStatus, JobError, Client, ClientBuilder
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user