feat: align OpenRPC server with simplified client API
- Updated RegisterRunnerParams to only require name (queue = name) - Added AddRunnerParams with RunnerConfig for add_runner method - Updated RunnerManagementParams and StopRunnerParams with secrets - Added add_runner method to OpenRPC trait and implementation - Removed duplicate AddRunnerParams definition - Updated client register_runner to send params as JSON object - Added TODO comments for moving secrets to HTTP headers
This commit is contained in:
@@ -97,18 +97,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let runner_path = runner_binary.path().to_string_lossy();
|
||||
let db_path = "/tmp/osiris_openrpc.db";
|
||||
|
||||
let command = format!(
|
||||
"{} osiris_runner --db-path {} --redis-url redis://localhost:6379",
|
||||
runner_path, db_path
|
||||
);
|
||||
|
||||
let runner_config = RunnerConfig {
|
||||
name: "osiris_runner".to_string(),
|
||||
command,
|
||||
env: None,
|
||||
};
|
||||
|
||||
client.add_runner("admin_secret", runner_config).await?;
|
||||
// Register the runner with the supervisor
|
||||
// Note: The current OpenRPC server uses register_runner, not add_runner
|
||||
client.register_runner("admin_secret", "osiris_runner").await?;
|
||||
println!("✅ Runner registered: osiris_runner");
|
||||
|
||||
client.start_runner("admin_secret", "osiris_runner").await?;
|
||||
|
||||
Reference in New Issue
Block a user