Add multiple asset adding route
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{
|
||||
cleanup, delete_where_symbols, optimize, select_where_symbol, types::Backfill, upsert,
|
||||
cleanup, delete_where_symbols, optimize, select_where_symbols, types::Backfill, upsert,
|
||||
};
|
||||
use clickhouse::{error::Error, Client};
|
||||
use tokio::sync::Semaphore;
|
||||
|
||||
select_where_symbol!(Backfill, "backfills_news");
|
||||
select_where_symbols!(Backfill, "backfills_news");
|
||||
upsert!(Backfill, "backfills_news");
|
||||
delete_where_symbols!("backfills_news");
|
||||
cleanup!("backfills_news");
|
||||
optimize!("backfills_news");
|
||||
|
||||
pub async fn unfresh(clickhouse_client: &Client) -> Result<(), Error> {
|
||||
clickhouse_client
|
||||
pub async fn unfresh(client: &Client, concurrency_limiter: &Arc<Semaphore>) -> Result<(), Error> {
|
||||
let _ = concurrency_limiter.acquire().await.unwrap();
|
||||
client
|
||||
.query("ALTER TABLE backfills_news UPDATE fresh = false WHERE true")
|
||||
.execute()
|
||||
.await
|
||||
|
Reference in New Issue
Block a user