Add redis pub/sub support.
This commit is contained in:
@ -58,7 +58,7 @@ func initConfig() {
|
||||
panic(err)
|
||||
}
|
||||
redisClient := redis.NewClient(redisOption)
|
||||
relayState = state.NewState(redisClient)
|
||||
relayState = state.NewState(redisClient, true)
|
||||
var machineryConfig = &config.Config{
|
||||
Broker: viper.GetString("redis_url"),
|
||||
DefaultQueue: "relay",
|
||||
|
@ -5,12 +5,14 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
state "github.com/yukimochi/Activity-Relay/State"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
viper.Set("actor_pem", "../misc/testKey.pem")
|
||||
viper.Set("relay_domain", "relay.yukimochi.example.org")
|
||||
initConfig()
|
||||
relayState = state.NewState(relayState.RedisClient, false)
|
||||
|
||||
relayState.RedisClient.FlushAll().Result()
|
||||
code := m.Run()
|
||||
|
Reference in New Issue
Block a user