Skip to content

Commit c85538b

Browse files
committed
Debug
1 parent ddf1d3e commit c85538b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/epsilon/server/instance_provider.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,25 @@ pub async fn get(template: &str, instance_provider: &State<Arc<InstanceProvider>
194194

195195
#[rocket::get("/get_all")]
196196
pub async fn get_all(instance_provider: &State<Arc<InstanceProvider>>) -> String {
197+
198+
info!("Fetching all instances");
199+
197200
let instances = instance_provider
198201
.get_instances(&InstanceType::Server, None, None, false)
199202
.await
200203
.map_err(|_| EpsilonError::ApiServerError("Failed to get every instance".to_string()))
201204
.unwrap()
202205
.into_iter();
203206

207+
info!("Fetched {} instances", instances.len());
208+
204209
let mut json_array: Vec<InstanceJson> = Vec::with_capacity(instances.len());
205210

206211
for instance in instances {
207212
json_array.push(instance.to_json().await);
208213
}
209214

215+
info!("Converted {} instances to json", json_array.len());
216+
210217
json!({ "instances": json_array }).to_string()
211218
}

0 commit comments

Comments
 (0)