refactor: migrate thread/async/queue/scheduler infra to mytheclipse
Deploy Scraper / build-and-deploy (push) Canceled after 0s

- bootstrap: TracingLayer from mytheclipse-tracing (composed with scraper
  env filter), RuntimeConfig::auto() thread logging, init job queue + cron.
- proxy_fetch: leader task via ::mytheclipse::spawn_io, gzip decompression
  offloaded to ::mytheclipse::compute (sized rayon pool, panic-isolated),
  bounded by new async fetch limiter (tokio Semaphore bridge).
- queue: new infrastructure/queue module over mytheclipse-queue
  (InMemoryQueue + WorkerPool + BackpressureEnforcer) for repair jobs.
- scheduler: new infrastructure/scheduler.rs using mytheclipse::cron for
  the daily 02:00 UTC image-cache cleanup.
- deps: add mytheclipse-queue + mytheclipse-tracing path deps; mytheclipse
  -> full feature; rayon 1.12; keep path deps for unpublished crates.
- tests: infra_round2 runtime smoke tests (compute panic isolation,
  spawn_io, backpressure admission, cron parse, queue roundtrip).
- Fix: local cache::mytheclipse bridge module shadowed the mytheclipse
  crate name; use leading :: at spawn_io/compute call sites.
This commit is contained in:
asepharyana
2026-08-30 19:40:01 +07:00
parent c7ffd29e79
commit 966d86ff67
14 changed files with 1109 additions and 686 deletions
+8 -9
View File
@@ -296,19 +296,18 @@ impl Anime2UseCases {
.map(|ep| ep.url.clone())
.collect();
let results: Vec<_> = futures::future::join_all(latest.iter().map(|url| {
self.repository.fetch_html(url)
}))
let results: Vec<_> = futures::future::join_all(
latest.iter().map(|url| self.repository.fetch_html(url)),
)
.await;
for (i, result) in results.into_iter().enumerate() {
if let Ok(html) = result {
if let Ok(Some(dl_url)) =
tokio::task::spawn_blocking(move || {
parser::parse_episode_download(&html)
})
.await
.unwrap_or(Ok(None))
if let Ok(Some(dl_url)) = tokio::task::spawn_blocking(move || {
parser::parse_episode_download(&html)
})
.await
.unwrap_or(Ok(None))
{
if let Some(ep) = episodes.get_mut(i) {
ep.download_url = Some(dl_url);