Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(cron): reformat test assertions and reorder scheduler re-exports

Steven Enamakel7531744f73f6
diff --git a/crates/openhuman-core/src/cron/ops_delivery_tests.rs b/crates/openhuman-core/src/cron/ops_delivery_tests.rs
index 96a90cfc12..249f777f12 100644
--- a/crates/openhuman-core/src/cron/ops_delivery_tests.rs
+++ b/crates/openhuman-core/src/cron/ops_delivery_tests.rs
@@ -590,7 +590,10 @@ async fn manual_runs_use_each_invocations_config_and_security_snapshot() {
"isolated config/scope child failed:\n{stdout}\n{}",
String::from_utf8_lossy(&output.stderr)
);
- assert!(stdout.contains("running 1 test"), "child selected no test: {stdout}");
+ assert!(
+ stdout.contains("running 1 test"),
+ "child selected no test: {stdout}"
+ );
assert!(
stdout.contains("test cron::ops::delivery_tests::manual_runs_use_each_invocations_config_and_security_snapshot ... ok"),
"the expected child test did not pass: {stdout}"
@@ -627,7 +630,9 @@ async fn manual_runs_use_each_invocations_config_and_security_snapshot() {
let job = cron::add_shell_job(
&first_config,
None,
- Schedule::Every { every_ms: 3_600_000 },
+ Schedule::Every {
+ every_ms: 3_600_000,
+ },
"unused by the test handler",
)
.unwrap();
@@ -663,9 +668,15 @@ async fn manual_runs_use_each_invocations_config_and_security_snapshot() {
let first = output(first);
let second = output(second);
assert_eq!(first["can_act"], false);
- assert_eq!(first["action_dir"], first_config.action_dir.display().to_string());
+ assert_eq!(
+ first["action_dir"],
+ first_config.action_dir.display().to_string()
+ );
assert_eq!(second["can_act"], true);
- assert_eq!(second["action_dir"], second_config.action_dir.display().to_string());
+ assert_eq!(
+ second["action_dir"],
+ second_config.action_dir.display().to_string()
+ );
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/cron/scheduler.rs b/crates/openhuman-core/src/cron/scheduler.rs
index 7c3bff628d..fdc5f95ddb 100644
--- a/crates/openhuman-core/src/cron/scheduler.rs
+++ b/crates/openhuman-core/src/cron/scheduler.rs
@@ -95,10 +95,10 @@ pub async fn run(ctx: &crate::core::runtime::DispatchCtx, config: Config) -> Res
}
pub use dispatcher::execute_job_now;
-pub(crate) use dispatcher::run_job_now;
-pub(crate) use dispatcher::{tick_once, JobDispatcher};
#[cfg(test)]
pub(crate) use dispatcher::lose_next_ack_reply_after_commit_for_test;
+pub(crate) use dispatcher::run_job_now;
+pub(crate) use dispatcher::{tick_once, JobDispatcher};
pub use live_agents::run_live_agent_pass;
pub(crate) use live_agents::LiveAgentSchedulers;
pub(crate) fn scheduler_config(config: &Config) -> serde_json::Value {