style: apply cargo fmt workspace-wide
Pure formatting pass from `cargo fmt --all`. No logic changes. Separating this out so the 1.9 release feature commits that follow show only their intentional edits.
This commit is contained in:
@@ -28,10 +28,7 @@ impl LifecyclePublisher for ValkeyLifecyclePublisher {
|
||||
let mut conn = self.conn.clone();
|
||||
let json = serde_json::to_string(&event)?;
|
||||
|
||||
let instance_channel = format!(
|
||||
"{}:lifecycle:{}",
|
||||
self.prefix, event.workflow_instance_id
|
||||
);
|
||||
let instance_channel = format!("{}:lifecycle:{}", self.prefix, event.workflow_instance_id);
|
||||
let all_channel = format!("{}:lifecycle:all", self.prefix);
|
||||
|
||||
// Publish to the instance-specific channel.
|
||||
|
||||
@@ -17,8 +17,9 @@ async fn publish_subscribe_round_trip() {
|
||||
}
|
||||
|
||||
let prefix = format!("wfe_test_{}", uuid::Uuid::new_v4().simple());
|
||||
let publisher =
|
||||
wfe_valkey::ValkeyLifecyclePublisher::new("redis://localhost:6379", &prefix).await.unwrap();
|
||||
let publisher = wfe_valkey::ValkeyLifecyclePublisher::new("redis://localhost:6379", &prefix)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let instance_id = "wf-lifecycle-test-1";
|
||||
let channel = format!("{}:lifecycle:{}", prefix, instance_id);
|
||||
@@ -42,12 +43,7 @@ async fn publish_subscribe_round_trip() {
|
||||
// Small delay to ensure the subscription is active before publishing.
|
||||
tokio::time::sleep(Duration::from_millis(200)).await;
|
||||
|
||||
let event = LifecycleEvent::new(
|
||||
instance_id,
|
||||
"def-1",
|
||||
1,
|
||||
LifecycleEventType::Started,
|
||||
);
|
||||
let event = LifecycleEvent::new(instance_id, "def-1", 1, LifecycleEventType::Started);
|
||||
publisher.publish(event).await.unwrap();
|
||||
|
||||
// Wait for the message with a timeout.
|
||||
@@ -71,8 +67,9 @@ async fn publish_to_all_channel() {
|
||||
}
|
||||
|
||||
let prefix = format!("wfe_test_{}", uuid::Uuid::new_v4().simple());
|
||||
let publisher =
|
||||
wfe_valkey::ValkeyLifecyclePublisher::new("redis://localhost:6379", &prefix).await.unwrap();
|
||||
let publisher = wfe_valkey::ValkeyLifecyclePublisher::new("redis://localhost:6379", &prefix)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let all_channel = format!("{}:lifecycle:all", prefix);
|
||||
|
||||
@@ -93,12 +90,7 @@ async fn publish_to_all_channel() {
|
||||
|
||||
tokio::time::sleep(Duration::from_millis(200)).await;
|
||||
|
||||
let event = LifecycleEvent::new(
|
||||
"wf-all-test",
|
||||
"def-1",
|
||||
1,
|
||||
LifecycleEventType::Completed,
|
||||
);
|
||||
let event = LifecycleEvent::new("wf-all-test", "def-1", 1, LifecycleEventType::Completed);
|
||||
publisher.publish(event).await.unwrap();
|
||||
|
||||
let received = tokio::time::timeout(Duration::from_secs(5), rx.recv())
|
||||
|
||||
@@ -2,7 +2,9 @@ use wfe_core::lock_suite;
|
||||
|
||||
async fn make_provider() -> wfe_valkey::ValkeyLockProvider {
|
||||
let prefix = format!("wfe_test_{}", uuid::Uuid::new_v4().simple());
|
||||
wfe_valkey::ValkeyLockProvider::new("redis://localhost:6379", &prefix).await.unwrap()
|
||||
wfe_valkey::ValkeyLockProvider::new("redis://localhost:6379", &prefix)
|
||||
.await
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
lock_suite!(make_provider);
|
||||
|
||||
@@ -2,7 +2,9 @@ use wfe_core::queue_suite;
|
||||
|
||||
async fn make_provider() -> wfe_valkey::ValkeyQueueProvider {
|
||||
let prefix = format!("wfe_test_{}", uuid::Uuid::new_v4().simple());
|
||||
wfe_valkey::ValkeyQueueProvider::new("redis://localhost:6379", &prefix).await.unwrap()
|
||||
wfe_valkey::ValkeyQueueProvider::new("redis://localhost:6379", &prefix)
|
||||
.await
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
queue_suite!(make_provider);
|
||||
|
||||
Reference in New Issue
Block a user