Merge branch 'x/gorm' into x/sqlc

r/paopao-ce-pro
Michael Li 1 year ago
commit 693ef1fc66
No known key found for this signature in database

@ -12,7 +12,7 @@ Server: # 服务设置
ReadTimeout: 60
WriteTimeout: 60
Features:
Default: ["Web", "Frontend:EmbedWeb", "Zinc", "LocalOSS", "MySQL", "BigCacheIndex", "LoggerZinc", "Friendship", "Followship"]
Default: ["Web", "Frontend:EmbedWeb", "Meili", "LocalOSS", "MySQL", "BigCacheIndex", "LoggerFile", "Friendship", "Followship"]
Develop: ["Base", "MySQL", "BigCacheIndex", "Meili", "Sms", "AliOSS", "LoggerMeili", "OSS:Retention"]
Demo: ["Base", "MySQL", "Option", "Zinc", "Sms", "MinIO", "LoggerZinc", "Migration"]
Slim: ["Base", "Sqlite3", "LocalOSS", "LoggerFile", "OSS:TempDir"]

@ -41,7 +41,7 @@ services:
# - paopao-network
redis:
image: redis/redis-stack:7.0.6-RC8
image: redis/redis-stack:7.2.0-RC3
restart: always
ports:
- 6379:6379
@ -51,33 +51,33 @@ services:
networks:
- paopao-network
zinc:
image: public.ecr.aws/zinclabs/zinc:latest
user: root
restart: always
ports:
- 4080:4080
volumes:
- ./custom/data/zinc/data:/data
environment:
ZINC_FIRST_ADMIN_USER: admin
ZINC_FIRST_ADMIN_PASSWORD: admin
DATA_PATH: /data
networks:
- paopao-network
# meili:
# image: getmeili/meilisearch:v1.2
# zinc:
# image: bitbus/zincsearch:latest
# user: zincsearch
# restart: always
# ports:
# - 7700:7700
# - 4080:4080
# volumes:
# - ./custom/data/meili/data:/meili_data
# - ./custom/data/zinc/data:/data
# environment:
# - MEILI_MASTER_KEY=paopao-meilisearch
# ZINC_FIRST_ADMIN_USER: admin
# ZINC_FIRST_ADMIN_PASSWORD: admin
# DATA_PATH: /data
# networks:
# - paopao-network
meili:
image: getmeili/meilisearch:v1.3
restart: always
ports:
- 7700:7700
volumes:
- ./custom/data/meili/data:/meili_data
environment:
- MEILI_MASTER_KEY=paopao-meilisearch
networks:
- paopao-network
# pyroscope:
# image: pyroscope/pyroscope:latest
# restart: always
@ -107,7 +107,7 @@ services:
depends_on:
- db
- redis
- zinc
- meili
# modify below to reflect your custom configure
volumes:
- ./config.yaml.sample:/app/paopao-ce/config.yaml

@ -14,9 +14,7 @@ var (
)
type bigCacheTweetsCache struct {
name string
version *semver.Version
bc *bigcache.BigCache
bc *bigcache.BigCache
}
func (s *bigCacheTweetsCache) getTweetsBytes(key string) ([]byte, error) {

@ -5,6 +5,7 @@
package cache
import (
"context"
"time"
"github.com/allegro/bigcache/v3"
@ -28,7 +29,7 @@ func NewBigCacheIndexService(ips core.IndexPostsService, ams core.AuthorizationM
c.MaxEntrySize = 10000
c.Logger = logrus.StandardLogger()
bc, err := bigcache.NewBigCache(c)
bc, err := bigcache.New(context.Background(), c)
if err != nil {
logrus.Fatalf("initial bigCahceIndex failure by err: %v", err)
}

Loading…
Cancel
Save