stackstorm-k8s
stackstorm-k8s copied to clipboard
Added job to remove uninstalled packs from Mongo database
Useful when changing the mounted pack image, that removes previously installed packs.
Normally the packs have been removed from disk, but are still registered in the Mongo database.
This runs a job as part of registering packs, to check for any packs no longer present on disk and removes them from the DB.
@cognifloyd if you can give me any pointers into the st2 core where we could add those new "primitives" I'd be happy to take a stab at re-implementing this functionality there (and I'd also add some logic to ignore dunder-name packs).
When I took a stab at this originally, I did look at doing it in core, but got lost trying to follow the code to locate the logic where pack loading happens at bootstrap - and therefore where I could add pack un loading