mirror of
https://codeberg.org/icewind/log-normalizer.git
synced 2026-06-03 13:54:11 +02:00
formatting
This commit is contained in:
parent
9354eea80e
commit
491a0daae4
2 changed files with 20 additions and 18 deletions
|
|
@ -211,6 +211,7 @@ pub async fn store_log(pool: &PgPool, id: i32, log: &NormalizedLog) -> Result<()
|
||||||
.id;
|
.id;
|
||||||
|
|
||||||
for class in &player.class_stats {
|
for class in &player.class_stats {
|
||||||
|
if class.class != Class::Unknown {
|
||||||
let class_stat_id: i32 = sqlx::query!(
|
let class_stat_id: i32 = sqlx::query!(
|
||||||
"INSERT INTO class_stats(player_id, type, time, kills, deaths, assists, dmg)\
|
"INSERT INTO class_stats(player_id, type, time, kills, deaths, assists, dmg)\
|
||||||
VALUES($1, $2, $3, $4, $5, $6, $7)\
|
VALUES($1, $2, $3, $4, $5, $6, $7)\
|
||||||
|
|
@ -243,6 +244,7 @@ pub async fn store_log(pool: &PgPool, id: i32, log: &NormalizedLog) -> Result<()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tx.commit().await?;
|
tx.commit().await?;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ async fn main() -> Result<(), MainError> {
|
||||||
let from = get_max_stored_log(&pool).await?;
|
let from = get_max_stored_log(&pool).await?;
|
||||||
|
|
||||||
for id in (from + 1)..=max {
|
for id in (from + 1)..=max {
|
||||||
println!("{}", id);
|
print!("{} ", id);
|
||||||
if let Some(log) = get_log(&raw_pool, id).await? {
|
if let Some(log) = get_log(&raw_pool, id).await? {
|
||||||
println!("{}", log.info.map);
|
println!("{}", log.info.map);
|
||||||
store_log(&pool, id, &log).await?;
|
store_log(&pool, id, &log).await?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue