Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
60bfadb8
authored
Jul 10, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔧
refactor(channel): add validation for CHANNEL_TEST_FREQUENCY in automatic tests
parent
4a02c5e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
controller/channel-test.go
+4
-0
main.go
+2
-2
No files found.
controller/channel-test.go
View file @
60bfadb8
...
...
@@ -354,6 +354,10 @@ func TestAllChannels(c *gin.Context) {
}
func
AutomaticallyTestChannels
(
frequency
int
)
{
if
frequency
<=
0
{
common
.
SysLog
(
"CHANNEL_TEST_FREQUENCY is not set or invalid, skipping automatic channel test"
)
return
}
for
{
time
.
Sleep
(
time
.
Duration
(
frequency
)
*
time
.
Minute
)
common
.
SysLog
(
"testing all channels"
)
...
...
main.go
View file @
60bfadb8
...
...
@@ -168,11 +168,11 @@ func InitResources() error {
common
.
SysLog
(
"No .env file found, using default environment variables. If needed, please create a .env file and set the relevant variables."
)
}
common
.
SetupLogger
()
// 加载环境变量
common
.
InitEnv
()
common
.
SetupLogger
()
// Initialize model settings
ratio_setting
.
InitRatioSettings
()
...
...
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