linting and fmt
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use log::{info, error, debug};
|
||||
use log::{debug, error, info};
|
||||
use rhai::Engine;
|
||||
use rhai_client::{RhaiClient, RhaiClientError}; // RhaiTaskDetails is now used for its fields
|
||||
use rhailib_worker::spawn_rhai_worker;
|
||||
@@ -55,7 +55,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let task_timeout = Duration::from_secs(10);
|
||||
let task_id = Uuid::new_v4().to_string(); // Generate a unique task_id
|
||||
|
||||
info!("Submitting script to circle '{}' with task_id '{}' and awaiting result...", circle_name, task_id);
|
||||
info!(
|
||||
"Submitting script to circle '{}' with task_id '{}' and awaiting result...",
|
||||
circle_name, task_id
|
||||
);
|
||||
info!("Script: {}", script_to_run);
|
||||
|
||||
match client
|
||||
@@ -64,7 +67,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
task_id.clone(), // Pass the generated task_id
|
||||
script_to_run.to_string(),
|
||||
task_timeout,
|
||||
None // public_key
|
||||
None, // public_key
|
||||
)
|
||||
.await
|
||||
{
|
||||
@@ -72,7 +75,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
info!("Task {} completed successfully!", details.task_id);
|
||||
debug!("Full Task Details: {:#?}", details);
|
||||
// The task_id is now part of the returned RhaiTaskDetails struct.
|
||||
info!("Received details for task_id: {}, script: {}", details.task_id, details.script);
|
||||
info!(
|
||||
"Received details for task_id: {}, script: {}",
|
||||
details.task_id, details.script
|
||||
);
|
||||
info!("Status: {}", details.status);
|
||||
if let Some(output) = details.output {
|
||||
info!("Output: {}", output); // Expected: 42
|
||||
@@ -110,4 +116,4 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
info!("Dedicated Reply Queue Demo finished.");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user