fixed: no output from rhai scripts
This commit is contained in:
parent
b62f1d26b0
commit
5140531832
28
src/lib.rs
28
src/lib.rs
@ -106,8 +106,29 @@ impl Actor for OSISActor {
|
||||
let job_id = &job.id;
|
||||
let _db_path = &self.db_path;
|
||||
|
||||
// Debug: Log job details
|
||||
info!(
|
||||
"OSIS Actor '{}', Job {}: Processing job with context_id: {}, script length: {}",
|
||||
OSIS, job_id, job.context_id, job.script.len()
|
||||
);
|
||||
|
||||
// Create job-specific logger
|
||||
let (job_logger, _guard) = create_job_logger_with_guard("logs", "osis", job_id).unwrap();
|
||||
let (job_logger, guard) = match create_job_logger_with_guard("logs", "osis", job_id) {
|
||||
Ok((logger, guard)) => {
|
||||
info!(
|
||||
"OSIS Actor '{}', Job {}: Job logger created successfully",
|
||||
OSIS, job_id
|
||||
);
|
||||
(logger, guard)
|
||||
},
|
||||
Err(e) => {
|
||||
error!(
|
||||
"OSIS Actor '{}', Job {}: Failed to create job logger: {}",
|
||||
OSIS, job_id, e
|
||||
);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
info!(
|
||||
"OSIS Actor '{}', Job {}: Starting sequential processing",
|
||||
@ -226,8 +247,11 @@ impl Actor for OSISActor {
|
||||
}
|
||||
}
|
||||
|
||||
// Force flush logs before dropping guard
|
||||
std::thread::sleep(std::time::Duration::from_millis(100));
|
||||
|
||||
// Keep the guard alive until after processing
|
||||
drop(_guard);
|
||||
drop(guard);
|
||||
|
||||
info!(
|
||||
"OSIS Actor '{}', Job {}: Sequential processing completed",
|
||||
|
Loading…
Reference in New Issue
Block a user