MishkaCmsCore.Runtime.Workers.SiteTeardownWorker (Mishka CMS Core v0.0.1)

Copy Markdown View Source

Frees everything a permanently-deleted site loaded into memory.

Runs on the dedicated :maintenance queue so a large site's teardown never competes with live module/asset compilation for other sites. The site's DB rows (and all child rows) are already gone via the ON DELETE CASCADE from the :permanent_destroy action; this worker only reclaims the in-memory artifacts: compiled modules, cached CSS/JS, routing metadata, and on-disk templates.

The job carries the site name and the list of module-backed records captured before the cascade ran (see MishkaCmsCore.Runtime.Resources.Changes.ScheduleSiteTeardown), because those rows no longer exist by the time this runs.

See MishkaCmsCore.Runtime.Workers.RuntimeCompilerWorker for the per-record lifecycle and MishkaCmsCore.Runtime.States.SiteState for the request gate.