Remove self from Crawls and Imports in actors at end of task

In case the user never listens to the stream so that I do not create
inifinitely growing hashmaps in the server memory.
This commit is contained in:
2023-08-29 23:30:00 -04:00
parent ceac234ce7
commit 276f0e17a8
7 changed files with 40 additions and 24 deletions

View File

@@ -66,11 +66,13 @@ async fn main() -> Result<()> {
client.clone(),
domain_locks.clone(),
config.content_dir.clone(),
crawls.clone(),
);
let _ = crawl_scheduler.bootstrap().await;
let importer = ImporterHandle::new(
pool.clone(),
crawl_scheduler.clone(),
imports.clone(),
);
let addr = format!("{}:{}", &config.host, &config.port).parse()?;