From 427c5ad1c52512d3c1ad4c0dc3a28b3e1f51101a Mon Sep 17 00:00:00 2001 From: Deluan Date: Thu, 26 Feb 2026 15:30:44 -0500 Subject: [PATCH] feat(plugins): register TaskQueue host service in manager --- plugins/manager_loader.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugins/manager_loader.go b/plugins/manager_loader.go index 610dbd028..a7700a855 100644 --- a/plugins/manager_loader.go +++ b/plugins/manager_loader.go @@ -128,6 +128,23 @@ var hostServices = []hostServiceEntry{ return host.RegisterHTTPHostFunctions(service), nil }, }, + { + name: "TaskQueue", + hasPermission: func(p *Permissions) bool { return p != nil && p.Taskqueue != nil }, + create: func(ctx *serviceContext) ([]extism.HostFunction, io.Closer) { + perm := ctx.permissions.Taskqueue + maxConcurrency := int32(1) + if perm.MaxConcurrency > 0 { + maxConcurrency = int32(perm.MaxConcurrency) + } + service, err := newTaskQueueService(ctx.pluginName, ctx.manager, maxConcurrency) + if err != nil { + log.Error("Failed to create TaskQueue service", "plugin", ctx.pluginName, err) + return nil, nil + } + return host.RegisterTaskQueueHostFunctions(service), service + }, + }, } // extractManifest reads manifest from an .ndp package and computes its SHA-256 hash.