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
conn.prepare_cached("SELECT EXISTS(SELECT 1 FROM __corro_seq_bookkeeping WHERE site_id = ? AND version >= ? AND version <= ?)")?.query_row(params![actor_id, versions.start(), versions.end()], |row| row.get(0))
1447
1446
}
1448
1447
1449
-
pubasyncfnread_files_from_paths<P:AsRef<Path>>(
1450
-
schema_paths:&[P],
1451
-
) -> eyre::Result<Vec<String>>{
1452
-
letmut contents = vec![];
1453
-
1454
-
for schema_path in schema_paths.iter(){
1455
-
match tokio::fs::metadata(schema_path).await{
1456
-
Ok(meta) => {
1457
-
if meta.is_dir(){
1458
-
match tokio::fs::read_dir(schema_path).await{
1459
-
Ok(mut dir) => {
1460
-
letmut entries = vec![];
1461
-
1462
-
whileletOk(Some(entry)) = dir.next_entry().await{
1463
-
entries.push(entry);
1464
-
}
1465
-
1466
-
letmut entries:Vec<_> = entries
1467
-
.into_iter()
1468
-
.filter_map(|entry| {
1469
-
entry.path().extension().and_then(|ext| {
1470
-
if ext == "sql"{
1471
-
Some(entry)
1472
-
}else{
1473
-
None
1474
-
}
1475
-
})
1476
-
})
1477
-
.collect();
1478
-
1479
-
entries.sort_by_key(|entry| entry.path());
1480
-
1481
-
for entry in entries.iter(){
1482
-
match tokio::fs::read_to_string(entry.path()).await{
1483
-
Ok(s) => {
1484
-
contents.push(s);
1485
-
}
1486
-
Err(e) => {
1487
-
warn!(
1488
-
"could not read schema file '{}', error: {e}",
1489
-
entry.path().display()
1490
-
);
1491
-
}
1492
-
}
1493
-
}
1494
-
}
1495
-
Err(e) => {
1496
-
warn!(
1497
-
"could not read dir '{}', error: {e}",
1498
-
schema_path.as_ref().display()
1499
-
);
1500
-
}
1501
-
}
1502
-
}elseif meta.is_file(){
1503
-
match tokio::fs::read_to_string(schema_path).await{
1504
-
Ok(s) => {
1505
-
contents.push(s);
1506
-
// pushed.push(schema_path.clone());
1507
-
}
1508
-
Err(e) => {
1509
-
warn!(
1510
-
"could not read schema file '{}', error: {e}",
1511
-
schema_path.as_ref().display()
1512
-
);
1513
-
}
1514
-
}
1515
-
}
1516
-
}
1517
-
1518
-
Err(e) => {
1519
-
warn!(
1520
-
"could not read schema file meta '{}', error: {e}",
0 commit comments