feat(core): implement cordis configuration extension and migrate all plugins

This commit is contained in:
ryan
2026-08-29 10:53:53 +08:00
parent b43c429544
commit ed8491addf
74 changed files with 1354 additions and 1145 deletions
@@ -4,7 +4,6 @@
package driver_asynq_worker
import (
"Wavelet/pkg/config"
"testing"
"github.com/redis/go-redis/v9/maintnotifications"
@@ -42,17 +41,17 @@ func TestMaintNotificationsConfig(t *testing.T) {
}
func TestPrefixedQueue(t *testing.T) {
oldPrefix := config.Config.Redis.KeyPrefix
oldPrefix := GetKeyPrefix()
defer func() {
config.Config.Redis.KeyPrefix = oldPrefix
SetKeyPrefix(oldPrefix)
}()
config.Config.Redis.KeyPrefix = "test:"
SetKeyPrefix("test:")
if got := PrefixedQueue("default"); got != "test:default" {
t.Fatalf("PrefixedQueue() = %q, want %q", got, "test:default")
}
config.Config.Redis.KeyPrefix = ""
SetKeyPrefix("")
if got := PrefixedQueue("default"); got != "default" {
t.Fatalf("PrefixedQueue() = %q, want %q", got, "default")
}