add tests and fix job impl
This commit is contained in:
@@ -4,7 +4,7 @@ use std::panic;
|
||||
use std::path::Path;
|
||||
use rhai::{Engine, Dynamic};
|
||||
|
||||
use actor_system::AsyncWorker;
|
||||
use runner_rust::AsyncRunner;
|
||||
|
||||
/// Recursively collect all .rhai files from a directory and its subdirectories
|
||||
fn collect_rhai_files(dir: &Path, files: &mut Vec<std::path::PathBuf>) -> Result<(), Box<dyn std::error::Error>> {
|
||||
@@ -113,7 +113,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
};
|
||||
|
||||
// Create a new engine instance and configure it with DSL modules
|
||||
let mut engine_with_context = match create_configured_engine(db_path, i + 1, verbose) {
|
||||
let engine_with_context = match create_configured_engine(db_path, i + 1, verbose) {
|
||||
Ok(engine) => engine,
|
||||
Err(e) => {
|
||||
println!("\x1b[31m✗\x1b[0m {} ... \x1b[31mFAILED\x1b[0m (engine setup: {})", script_name, e);
|
||||
@@ -185,7 +185,7 @@ fn create_configured_engine(db_path: &str, script_index: usize, verbose: bool) -
|
||||
let mut engine = Engine::new();
|
||||
|
||||
// Register all DSL modules (same as OSIS engine configuration)
|
||||
actor_system::register_sal_modules(&mut engine);
|
||||
runner_rust::register_sal_modules(&mut engine);
|
||||
|
||||
// Set up job context tags (similar to execute_job_with_engine)
|
||||
let mut db_config = rhai::Map::new();
|
||||
|
Reference in New Issue
Block a user