import page progress live

This commit is contained in:
Priec
2026-08-19 00:51:13 +02:00
parent e2956455c8
commit d6f2e6b0a4
12 changed files with 724 additions and 61 deletions

View File

@@ -108,6 +108,10 @@ pub(crate) struct AppState {
validations: TableValidationServiceClient<Channel>,
tables_data: TablesDataClient<Channel>,
ecb: EcbServiceClient<Channel>,
/// The imports this process is running, which the import page polls. Not a
/// client: an import outlives the request that started it, so where it has
/// got to has to live somewhere both the task and the next request can see.
imports: pages::import_export::import::progress::ImportJobs,
}
/// Starts the web UI as a detached task on the current Tokio runtime.
@@ -141,6 +145,7 @@ pub async fn serve() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
tables_data: TablesDataClient::new(channel.clone()),
ecb: EcbServiceClient::new(channel.clone()),
structures: TableStructureServiceClient::new(channel),
imports: Default::default(),
};
let listener = tokio::net::TcpListener::bind(listen_address).await?;
@@ -206,6 +211,7 @@ mod tests {
tables_data: TablesDataClient::new(channel.clone()),
ecb: EcbServiceClient::new(channel.clone()),
structures: TableStructureServiceClient::new(channel),
imports: Default::default(),
})
}