Format
This commit is contained in:
parent
51e73606b1
commit
5f0498aa73
2 changed files with 6 additions and 9 deletions
|
|
@ -24,7 +24,6 @@ pub async fn create_table(pool: &SqlitePool) {
|
|||
.execute(pool)
|
||||
.await
|
||||
.expect("failed to create ohlcv_1h table");
|
||||
|
||||
}
|
||||
|
||||
/// Returns the highest `bucket_ts` in `ohlcv_1h`, or `None` if the table is empty.
|
||||
|
|
|
|||
14
src/main.rs
14
src/main.rs
|
|
@ -440,15 +440,13 @@ async fn launch() -> _ {
|
|||
let cutoff = (now - BACKFILL_SAFETY_SECS) / 3600 * 3600;
|
||||
let since_opt = match max_bucket_ts {
|
||||
Some(ts) => Some(ts + 3600),
|
||||
None => {
|
||||
match db::cauldron::ohlcv::get_min_trade_bucket_ts(&dbpool.cauldron_r).await {
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
warn!("ohlcv backfill: could not read min trade ts: {e}");
|
||||
None
|
||||
}
|
||||
None => match db::cauldron::ohlcv::get_min_trade_bucket_ts(&dbpool.cauldron_r).await {
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
warn!("ohlcv backfill: could not read min trade ts: {e}");
|
||||
None
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
if since_opt.is_none() {
|
||||
info!("ohlcv backfill: no confirmed trades found, skipping");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue