Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
token-bridge
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
movabridge
token-bridge
Commits
8d7b2819
Commit
8d7b2819
authored
Nov 20, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add task loop interval param.
parent
3baa11b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
config.toml
config.toml
+1
-0
config.go
config/config.go
+6
-5
eth.go
dao/eth.go
+4
-1
No files found.
config.toml
View file @
8d7b2819
debug
=
false
task_loop_interval
=
30
aeskey
=
"/app/keys/aes.key"
otpkey
=
"/app/keys/val.otp"
...
...
config/config.go
View file @
8d7b2819
...
...
@@ -5,11 +5,12 @@ import (
)
type
Config
struct
{
Debug
bool
AesKeyPath
string
`toml:"aeskey"`
OTPKeyPath
string
`toml:"otpkey"`
Chains
map
[
string
]
*
ChainConfig
`toml:"chains"`
MySQL
MySQLConfig
Debug
bool
TaskLoopInterval
int
`toml:"task_loop_interval"`
AesKeyPath
string
`toml:"aeskey"`
OTPKeyPath
string
`toml:"otpkey"`
Chains
map
[
string
]
*
ChainConfig
`toml:"chains"`
MySQL
MySQLConfig
}
type
ChainConfig
struct
{
...
...
dao/eth.go
View file @
8d7b2819
...
...
@@ -219,7 +219,7 @@ func (d *Dao) HandleTasks() {
defer
d
.
wg
.
Done
()
ticker
:=
time
.
NewTicker
(
5
*
time
.
Second
)
maxCount
:=
5
maxCount
:=
30
offset
:=
0
defer
ticker
.
Stop
()
...
...
@@ -232,6 +232,9 @@ func (d *Dao) HandleTasks() {
if
d
.
validatorPk
==
nil
{
continue
}
if
d
.
c
.
TaskLoopInterval
>=
1
{
ticker
.
Reset
(
time
.
Duration
(
d
.
c
.
TaskLoopInterval
)
*
time
.
Second
)
}
// select unprocessed bridge event with maxCount.
events
,
err
:=
d
.
GetUnprocessedBridgeEvents
(
maxCount
,
offset
)
if
err
!=
nil
{
...
...
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