Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
claim-monitor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
claim-monitor
Commits
7422e0b0
Commit
7422e0b0
authored
May 09, 2024
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6281e57d
Pipeline
#756
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
dao.go
dao/dao.go
+3
-5
docker-compose.yml
docker-compose.yml
+1
-1
No files found.
dao/dao.go
View file @
7422e0b0
...
@@ -52,11 +52,9 @@ func New(_c *config.Config) (dao *Dao, err error) {
...
@@ -52,11 +52,9 @@ func New(_c *config.Config) (dao *Dao, err error) {
sqlDB
.
SetMaxOpenConns
(
_c
.
Mysql
.
MaxConn
)
sqlDB
.
SetMaxOpenConns
(
_c
.
Mysql
.
MaxConn
)
sqlDB
.
SetMaxIdleConns
(
_c
.
Mysql
.
MaxIdleConn
)
sqlDB
.
SetMaxIdleConns
(
_c
.
Mysql
.
MaxIdleConn
)
sqlDB
.
SetConnMaxIdleTime
(
time
.
Hour
)
sqlDB
.
SetConnMaxIdleTime
(
time
.
Hour
)
if
_c
.
Mysql
.
Migrate
{
err
=
dao
.
db
.
AutoMigrate
(
&
dbmodel
.
Height
{},
&
dbmodel
.
Record
{})
err
=
dao
.
db
.
AutoMigrate
(
&
dbmodel
.
Height
{},
&
dbmodel
.
Record
{})
if
err
!=
nil
{
if
err
!=
nil
{
return
panic
(
err
)
}
}
}
return
dao
,
nil
return
dao
,
nil
...
...
docker-compose.yml
View file @
7422e0b0
...
@@ -22,7 +22,7 @@ services:
...
@@ -22,7 +22,7 @@ services:
command
:
command
:
-
"
/bin/sh"
-
"
/bin/sh"
-
"
-c"
-
"
-c"
-
"
/usr/bin/sync
-c
/config.toml
--migrate
"
-
"
/usr/bin/sync
-c
/config.toml"
restart
:
restart
:
unless-stopped
unless-stopped
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment