Skip to content

Commit 1a9cde5

Browse files
committed
<fix>: 一些小修改
1 parent 8e28ee9 commit 1a9cde5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/kafka/producer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (p *AsyncProducer) SendMessage(topic, key, value string) (int32, int64, err
119119
p.producer.Input() <- msg
120120

121121
//异步不能在这里查错
122-
return -1, -1, nil
122+
return 0, 0, nil
123123
}
124124

125125
func (p *AsyncProducer) Close() error {

pkg/sql/cache.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type CacheExecute struct {
1616
SetTTl time.Duration //写入缓存的允许最大时长
1717
}
1818

19-
func ConnectCache(addr, password string, number int, TTL, TTL2 time.Duration) *CacheExecute {
19+
func ConnectCache(addr, password string, number int, CacheTTL, SetTTL time.Duration) *CacheExecute {
2020
rdb := redis.NewClient(&redis.Options{
2121
Addr: addr,
2222
Password: password,
@@ -25,8 +25,8 @@ func ConnectCache(addr, password string, number int, TTL, TTL2 time.Duration) *C
2525

2626
return &CacheExecute{
2727
rdb,
28-
TTL,
29-
TTL2,
28+
CacheTTL,
29+
SetTTL,
3030
}
3131
}
3232

0 commit comments

Comments
 (0)