[WIP] working download and replace.

This commit is contained in:
Vladimir Stoilov
2024-08-30 12:40:51 +03:00
parent f7abb700bf
commit 701505ae75
18 changed files with 168 additions and 276 deletions

View File

@@ -22,7 +22,7 @@ var (
)
func registerIntelUpdateHook() error {
module.instance.Updates().EventResourcesUpdated.AddCallback("update SPN intel", func(wc *mgr.WorkerCtx, s struct{}) (cancel bool, err error) {
module.instance.IntelUpdates().EventResourcesUpdated.AddCallback("update SPN intel", func(wc *mgr.WorkerCtx, s struct{}) (cancel bool, err error) {
return false, updateSPNIntel(wc.Ctx(), nil)
})
@@ -49,7 +49,7 @@ func updateSPNIntel(_ context.Context, _ interface{}) (err error) {
}
// Get intel file and load it from disk.
intelResource, err = module.instance.Updates().GetFile(intelResourcePath)
intelResource, err = module.instance.IntelUpdates().GetFile(intelResourcePath)
if err != nil {
return fmt.Errorf("failed to get SPN intel update: %w", err)
}