ai pubsub
This commit is contained in:
@@ -127,6 +127,13 @@ func main() {
|
||||
log.Fatalf("Error creating cart pool: %v\n", err)
|
||||
}
|
||||
|
||||
pool.SetPubSub(actor.NewPubSub(func(id uint64, event actor.Event) {
|
||||
grain, _ := pool.Get(context.Background(), id)
|
||||
if sub, ok := any(grain).(actor.Subscribable); ok {
|
||||
sub.Notify(event)
|
||||
}
|
||||
}))
|
||||
|
||||
klarnaClient := NewKlarnaClient(KlarnaPlaygroundUrl, os.Getenv("KLARNA_API_USERNAME"), os.Getenv("KLARNA_API_PASSWORD"))
|
||||
rdb := redis.NewClient(&redis.Options{
|
||||
Addr: redisAddress,
|
||||
|
||||
Reference in New Issue
Block a user