Skip to content

Commit f2db5d6

Browse files
committed
fix db url
1 parent 549e845 commit f2db5d6

7 files changed

Lines changed: 16 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ accounts:
4949
api_key: your_api_key_here
5050
api_secret: your_secret_here
5151
database:
52-
url: postgresql://postgres:123@[timescaledb]:5432/ban
52+
url: postgresql://postgres:123@timescaledb:5432/ban
5353
```
5454
```bash
5555
docker run -d --name banbot -p 8000:8000 --network mynet -v /root:/root banbot/banbot:latest -config /root/config.yml

biz/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ database:
9494
retention: all
9595
max_pool_size: 50
9696
auto_create: true
97-
url: postgresql://postgres:123@[127.0.0.1]:5432/ban
97+
url: postgresql://postgres:123@127.0.0.1:5432/ban
9898
spider_addr: 127.0.0.1:6789
9999
rpc_channels:
100100
mail1:

core/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var (
4848
lockOdBook sync.Mutex // 确认不冲突,无需用deadlock
4949

5050
ConcurNum = 2 // The maximum number of K-line tasks to be downloaded at the same time. If it is too high, a 429 current limit will occur. 最大同时下载K线任务数,过大会出现429限流
51-
Version = "v0.2.23-beta.32"
51+
Version = "v0.2.23-beta.33"
5252
UIVersion = "v0.2.23-beta.3"
5353
SysLang string // language code for current system 当前系统语言设置
5454
LogFile string

doc/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ database: # 数据库配置
152152
retention: all
153153
max_pool_size: 50 # 连接池最大大小
154154
auto_create: true # 数据库不存在时,是否自动创建
155-
url: postgresql://postgres:123@[127.0.0.1]:5432/bantd3
155+
url: postgresql://postgres:123@127.0.0.1:5432/bantd3
156156
spider_addr: 127.0.0.1:6789 # 爬虫监听的端口和地址
157157
rpc_channels: # 支持的全部rpc渠道
158158
mail1:

orm/sqlc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sql:
44
queries: "sql/pg_query.sql"
55
schema: "sql/pg_schema.sql"
66
database:
7-
uri: postgresql://postgres:123@[host.docker.internal]:5432/bantd3
7+
uri: postgresql://postgres:123@host.docker.internal:5432/bantd3
88
gen:
99
go:
1010
package: "orm"

utils/banio.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -683,12 +683,13 @@ func getErrType(err error) (int, string) {
683683
}
684684

685685
type ServerIO struct {
686-
Addr string
687-
aesKey string
688-
Conns []IBanConn
689-
Data map[string]string // Cache data available for remote access 缓存的数据,可供远程端访问
690-
DataExp map[string]int64 // Cache data expiration timestamp, 13 bits 缓存数据的过期时间戳,13位
691-
InitConn func(*BanConn)
686+
Addr string
687+
aesKey string
688+
Conns []IBanConn
689+
Data map[string]string // Cache data available for remote access 缓存的数据,可供远程端访问
690+
DataExp map[string]int64 // Cache data expiration timestamp, 13 bits 缓存数据的过期时间戳,13位
691+
InitConn func(*BanConn)
692+
OnConnExit func(*BanConn, *errs.Error)
692693
}
693694

694695
var (
@@ -729,6 +730,9 @@ func (s *ServerIO) RunForever(intvSecs, timeoutSecs int) *errs.Error {
729730
log.Warn("read client fail", zap.String("remote", conn.GetRemote()),
730731
zap.String("err", err.Message()))
731732
}
733+
if s.OnConnExit != nil {
734+
s.OnConnExit(conn, err)
735+
}
732736
}()
733737
}
734738
}

web/ui/src/lib/dev/AllConfig.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ database:
153153
retention: all
154154
max_pool_size: 50
155155
auto_create: true # ${m.cfg_db_auto_create()}
156-
url: postgresql://postgres:123@[127.0.0.1]:5432/ban
156+
url: postgresql://postgres:123@127.0.0.1:5432/ban
157157
spider_addr: 127.0.0.1:6789 # ${m.cfg_spider()}
158158
rpc_channels: # ${m.cfg_rpc_channels()}
159159
wx_notify: # ${m.cfg_rpc_name()}

0 commit comments

Comments
 (0)