You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/base/src/store.rs
+34-21Lines changed: 34 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ use prost::Message;
6
6
use tucana::shared::{ExecutionFlow,ValidationFlow,Value};
7
7
8
8
pubstructAdapterStore{
9
-
client: async_nats::Client,
10
-
kv: async_nats::jetstream::kv::Store,
9
+
pubclient: async_nats::Client,
10
+
pubkv: async_nats::jetstream::kv::Store,
11
11
}
12
12
13
13
pubenumFlowIdentifyResult{
@@ -56,7 +56,7 @@ impl AdapterStore {
56
56
/// - id: The identifier to use for identifying the possible matches. Its just a fine grain identifier that can be used to identify the possible matches. For a REST Flow this will be the regex matcher, for a CRON Flow the trait just return true every time.
57
57
///
58
58
/// Returns:
59
-
/// - FlowIdenfiyResult: The result of the flow identification process. This can be one of the following:
59
+
/// - FlowIdentifyResult: The result of the flow identification process. This can be one of the following:
60
60
/// - None: No flows matched the identifier.
61
61
/// - Single(ValidationFlow): A single flow matched the identifier.
62
62
/// - Multiple(Vec<ValidationFlow>): Multiple flows matched the identifier.
log::error!("Failed to send request to NATS server: {:?}", err);
128
+
None
129
+
}
130
+
}
131
+
}
132
+
}
133
+
104
134
/// validate_and_execute_flow
105
135
///
106
136
/// This function will validate the flow. If the flow is valid, it will execute (send the flow to the execution and wait for a/multiple result/s) the flow.
@@ -124,25 +154,8 @@ impl AdapterStore {
124
154
};
125
155
}
126
156
127
-
let uuid = uuid::Uuid::new_v4().to_string();
128
157
let execution_flow:ExecutionFlow = Self::convert_validation_flow(flow, input_value);
129
-
let bytes = execution_flow.encode_to_vec();
130
-
let topic = format!("execution.{}", uuid);
131
-
let result = self.client.request(topic, bytes.into()).await;
0 commit comments