redux of the worker queue
This commit is contained in:
+1
-1
Submodule shanty-db updated: e76b2fc575...d2b21789d3
+1
-1
Submodule shanty-index updated: 3494de1133...9d1366f266
+1
-1
Submodule shanty-org updated: a2152cbf8d...0a0fa18bfa
+1
-1
Submodule shanty-tag updated: 65c229ee7f...e74dec206b
+1
-1
Submodule shanty-web updated: 59a26c18f3...36345b12ee
+5
-12
@@ -14,6 +14,7 @@ use shanty_search::MusicBrainzSearch;
|
||||
use shanty_web::routes;
|
||||
use shanty_web::state::AppState;
|
||||
use shanty_web::tasks::TaskManager;
|
||||
use shanty_web::workers::WorkerManager;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "shanty", about = "Shanty — self-hosted music management")]
|
||||
@@ -128,21 +129,13 @@ async fn main() -> anyhow::Result<()> {
|
||||
config: std::sync::Arc::new(tokio::sync::RwLock::new(config)),
|
||||
config_path,
|
||||
tasks: TaskManager::new(),
|
||||
workers: WorkerManager::new(),
|
||||
firefox_login: tokio::sync::Mutex::new(None),
|
||||
scheduler: tokio::sync::Mutex::new(shanty_web::state::SchedulerInfo {
|
||||
next_pipeline: None,
|
||||
next_monitor: None,
|
||||
skip_pipeline: false,
|
||||
skip_monitor: false,
|
||||
}),
|
||||
});
|
||||
|
||||
// Start background cookie refresh task
|
||||
shanty_web::cookie_refresh::spawn(state.config.clone());
|
||||
|
||||
// Start pipeline and monitor schedulers
|
||||
shanty_web::pipeline_scheduler::spawn(state.clone());
|
||||
shanty_web::monitor::spawn(state.clone());
|
||||
// Start work queue workers and unified scheduler
|
||||
WorkerManager::spawn_all(state.clone());
|
||||
shanty_web::scheduler::spawn(state.clone());
|
||||
shanty_web::mb_update::spawn(state.clone());
|
||||
|
||||
// Resolve static files directory
|
||||
|
||||
Reference in New Issue
Block a user